@@ -56,12 +56,10 @@ def dir_is_newer(dir_a, dir_b):
56
56
return newest_a < newest_b
57
57
58
58
59
- def get_base_cflags (force_object_files = False , debug_info = True ):
59
+ def get_base_cflags (force_object_files = False ):
60
60
# Always build system libraries with debug information. Non-debug builds
61
61
# will ignore this at link time because we link with `-strip-debug`.
62
- flags = []
63
- if debug_info :
64
- flags .append ('-g' )
62
+ flags = ['-g' ]
65
63
if settings .LTO and not force_object_files :
66
64
flags += ['-flto=' + settings .LTO ]
67
65
if settings .RELOCATABLE :
@@ -1638,7 +1636,7 @@ def install_headers(src_dir, pattern="*.h", target=None):
1638
1636
shutil .copyfile (f , os .path .join (dest , os .path .basename (f )))
1639
1637
1640
1638
@staticmethod
1641
- def build_port (src_path , output_path , includes = [], flags = [], exclude_files = [], exclude_dirs = [], debug_info = True ):
1639
+ def build_port (src_path , output_path , includes = [], flags = [], exclude_files = [], exclude_dirs = []):
1642
1640
srcs = []
1643
1641
for root , dirs , files in os .walk (src_path , topdown = False ):
1644
1642
if any ((excluded in root ) for excluded in exclude_dirs ):
@@ -1658,19 +1656,19 @@ def build_port(src_path, output_path, includes=[], flags=[], exclude_files=[], e
1658
1656
commands .append ([shared .EMCC , '-c' , src , '-O2' , '-o' , obj , '-w' ] + include_commands + flags )
1659
1657
objects .append (obj )
1660
1658
1661
- Ports .run_commands (commands , debug_info = debug_info )
1659
+ Ports .run_commands (commands )
1662
1660
create_lib (output_path , objects )
1663
1661
return output_path
1664
1662
1665
1663
@staticmethod
1666
- def run_commands (commands , debug_info = True ):
1664
+ def run_commands (commands ):
1667
1665
# Runs a sequence of compiler commands, adding importand cflags as defined by get_cflags() so
1668
1666
# that the ports are built in the correct configuration.
1669
1667
def add_args (cmd ):
1670
1668
# this must only be called on a standard build command
1671
1669
assert cmd [0 ] in (shared .EMCC , shared .EMXX )
1672
1670
# add standard cflags, but also allow the cmd to override them
1673
- return cmd [:1 ] + get_base_cflags (debug_info = debug_info ) + cmd [1 :]
1671
+ return cmd [:1 ] + get_base_cflags () + cmd [1 :]
1674
1672
run_build_commands ([add_args (c ) for c in commands ])
1675
1673
1676
1674
@staticmethod
0 commit comments