Skip to content

Commit

Permalink
build: allow overriding clang usage
Browse files Browse the repository at this point in the history
PR-URL: #56016
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
codebytere authored and aduh95 committed Dec 13, 2024
1 parent 2793113 commit 21e1d70
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
default=None,
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',
action='store',
dest='dest_os',
Expand Down Expand Up @@ -1405,6 +1411,10 @@ def configure_node(o):
o['variables']['target_arch'] = target_arch
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
if options.cross_compiling is not None
else target_arch != host_arch)
Expand Down

0 comments on commit 21e1d70

Please sign in to comment.