mirror of
https://github.com/nodejs/node.git
synced 2025-04-29 14:25:18 +00:00
build: allow overriding clang usage
PR-URL: https://github.com/nodejs/node/pull/56016 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
parent
ebc179d68b
commit
3b6da7ce76
10
configure.py
10
configure.py
@ -131,6 +131,12 @@ parser.add_argument('--use-prefix-to-find-headers',
|
|||||||
default=None,
|
default=None,
|
||||||
help='use the prefix to look for pre-installed headers')
|
help='use the prefix to look for pre-installed headers')
|
||||||
|
|
||||||
|
parser.add_argument('--use_clang',
|
||||||
|
action='store_true',
|
||||||
|
dest='use_clang',
|
||||||
|
default=None,
|
||||||
|
help='use clang instead of gcc')
|
||||||
|
|
||||||
parser.add_argument('--dest-os',
|
parser.add_argument('--dest-os',
|
||||||
action='store',
|
action='store',
|
||||||
dest='dest_os',
|
dest='dest_os',
|
||||||
@ -1407,6 +1413,10 @@ def configure_node(o):
|
|||||||
o['variables']['target_arch'] = target_arch
|
o['variables']['target_arch'] = target_arch
|
||||||
o['variables']['node_byteorder'] = sys.byteorder
|
o['variables']['node_byteorder'] = sys.byteorder
|
||||||
|
|
||||||
|
# Allow overriding the compiler - needed by embedders.
|
||||||
|
if options.use_clang:
|
||||||
|
o['variables']['clang'] = 1
|
||||||
|
|
||||||
cross_compiling = (options.cross_compiling
|
cross_compiling = (options.cross_compiling
|
||||||
if options.cross_compiling is not None
|
if options.cross_compiling is not None
|
||||||
else target_arch != host_arch)
|
else target_arch != host_arch)
|
||||||
|
Loading…
Reference in New Issue
Block a user