Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a0892b85
Commit
a0892b85
authored
Sep 22, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build/python/autotools: add option `per_arch_cflags`
parent
485c7805
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
autotools.py
python/build/autotools.py
+9
-2
No files found.
python/build/autotools.py
View file @
a0892b85
import
os.path
,
subprocess
,
sys
from
typing
import
Collection
,
Iterable
,
Optional
,
Sequence
,
Union
from
collections.abc
import
Mapping
from
build.makeproject
import
MakeProject
from
.toolchain
import
AnyToolchain
...
...
@@ -9,6 +10,7 @@ class AutotoolsProject(MakeProject):
configure_args
:
Iterable
[
str
]
=
[],
autogen
:
bool
=
False
,
autoreconf
:
bool
=
False
,
per_arch_cflags
:
Optional
[
Mapping
[
str
,
str
]]
=
None
,
cppflags
:
str
=
''
,
ldflags
:
str
=
''
,
libs
:
str
=
''
,
...
...
@@ -18,6 +20,7 @@ class AutotoolsProject(MakeProject):
self
.
configure_args
=
configure_args
self
.
autogen
=
autogen
self
.
autoreconf
=
autoreconf
self
.
per_arch_cflags
=
per_arch_cflags
self
.
cppflags
=
cppflags
self
.
ldflags
=
ldflags
self
.
libs
=
libs
...
...
@@ -38,12 +41,16 @@ class AutotoolsProject(MakeProject):
build
=
self
.
make_build_path
(
toolchain
)
arch_cflags
=
''
if
self
.
per_arch_cflags
is
not
None
and
toolchain
.
host_triplet
is
not
None
:
arch_cflags
=
self
.
per_arch_cflags
.
get
(
toolchain
.
host_triplet
,
''
)
configure
=
[
os
.
path
.
join
(
src
,
'configure'
),
'CC='
+
toolchain
.
cc
,
'CXX='
+
toolchain
.
cxx
,
'CFLAGS='
+
toolchain
.
cflags
,
'CXXFLAGS='
+
toolchain
.
cxxflags
,
'CFLAGS='
+
toolchain
.
cflags
+
' '
+
arch_cflags
,
'CXXFLAGS='
+
toolchain
.
cxxflags
+
' '
+
arch_cflags
,
'CPPFLAGS='
+
toolchain
.
cppflags
+
' '
+
self
.
cppflags
,
'LDFLAGS='
+
toolchain
.
ldflags
+
' '
+
self
.
ldflags
,
'LIBS='
+
toolchain
.
libs
+
' '
+
self
.
libs
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment