Skip to content

Commit 3380af0

Browse files
codebytereaduh95
authored andcommitted
build: allow overriding clang usage
1 parent 585f7bc commit 3380af0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

configure.py

+10
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@
131131
default=None,
132132
help='use the prefix to look for pre-installed headers')
133133

134+
parser.add_argument('--use_clang',
135+
action='store_true',
136+
dest='use_clang',
137+
default=None,
138+
help='use clang instead of gcc')
139+
134140
parser.add_argument('--dest-os',
135141
action='store',
136142
dest='dest_os',
@@ -1407,6 +1413,10 @@ def configure_node(o):
14071413
o['variables']['target_arch'] = target_arch
14081414
o['variables']['node_byteorder'] = sys.byteorder
14091415

1416+
# Allow overriding the compiler - needed by embedders.
1417+
if options.use_clang:
1418+
o['variables']['clang'] = 1
1419+
14101420
cross_compiling = (options.cross_compiling
14111421
if options.cross_compiling is not None
14121422
else target_arch != host_arch)

0 commit comments

Comments
 (0)