MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / add_cflags

Function add_cflags

tools/ports/__init__.py:656–675  ·  view source on GitHub ↗

Add any compiler flags (e.g -Ifoo) needed by the selected ports. This is called during the compile phase. Can also add/change settings. Can have the side effect of building and installing the needed ports.

(args, settings)

Source from the content-addressed store, hash-verified

654
655
656def add_cflags(args, settings):
657 """Add any compiler flags (e.g -Ifoo) needed by the selected ports.
658
659 This is called during the compile phase. Can also add/change settings.
660
661 Can have the side effect of building and installing the needed ports.
662 """
663 # Legacy SDL1 port is not actually a port at all but builtin
664 if settings.USE_SDL == 1:
665 args += ['-I' + Ports.get_include_dir('SDL')]
666
667 needed = get_needed_ports(settings, cflags_only=True)
668
669 # Now get (i.e. build) the ports in dependency order. This is important because the
670 # headers from one port might be needed before we can build the next.
671 for port in dependency_order(needed):
672 # When using embuilder, don't build the dependencies
673 if not os.getenv('EMBUILDER_PORT_BUILD_DEFERRED'):
674 port.get(Ports, settings, shared)
675 args += port.process_args(Ports)
676
677
678def show_ports():

Callers

nothing calls this directly

Calls 4

get_needed_portsFunction · 0.85
dependency_orderFunction · 0.85
get_include_dirMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected