Skip to content

Commit

Permalink
Allow passing CFLAGS/LFLAGS from build.py to emscripten (defold#9624)
Browse files Browse the repository at this point in the history
  • Loading branch information
smagnuso authored Nov 5, 2024
1 parent e70ecd6 commit ab51fe1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build_tools/waf_dynamo.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,12 @@ def default_flags(self):
emflags_link =[j for i in emflags_link for j in i]

flags = []
if os.environ.get('EMCFLAGS', None) is not None:
flags += os.environ.get("EMCFLAGS", "").split(' ')
linkflags = []
if os.environ.get('EMLINKFLAGS', None) is not None:
linkflags += os.environ.get("EMLINKFLAGS", "").split(' ')

if int(opt_level) < 2:
flags = ['-gseparate-dwarf', '-gsource-map']
linkflags = ['-gseparate-dwarf', '-gsource-map']
Expand Down

0 comments on commit ab51fe1

Please sign in to comment.