-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add option to enable clang-cl on Windows #52870
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ set ltcg= | |
set target_env= | ||
set noprojgen= | ||
set projgen= | ||
set clang_cl= | ||
set nobuild= | ||
set sign= | ||
set nosnapshot= | ||
|
@@ -87,6 +88,7 @@ if /i "%1"=="arm64" set target_arch=arm64&goto arg-ok | |
if /i "%1"=="vs2022" set target_env=vs2022&goto arg-ok | ||
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok | ||
if /i "%1"=="projgen" set projgen=1&goto arg-ok | ||
if /i "%1"=="clang-cl" set clang_cl=1&goto arg-ok | ||
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok | ||
if /i "%1"=="nosign" set "sign="&echo Note: vcbuild no longer signs by default. "nosign" is redundant.&goto arg-ok | ||
if /i "%1"=="sign" set sign=1&goto arg-ok | ||
|
@@ -190,6 +192,8 @@ if defined nosnapshot set configure_flags=%configure_flags% --without-snap | |
if defined nonpm set configure_flags=%configure_flags% --without-npm | ||
if defined nocorepack set configure_flags=%configure_flags% --without-corepack | ||
if defined ltcg set configure_flags=%configure_flags% --with-ltcg | ||
:: If clang-cl build is requested, set it to 17.0, which is the version shipped with VS 2022. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will work, although it'd be good to add some kind of detection from the system later on. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I just don't know how to do it 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries, it can be a follow-up PR. For now, it's important that we know it should be done. |
||
if defined clang_cl set configure_flags=%configure_flags% --clang-cl=17.0 | ||
if defined release_urlbase set configure_flags=%configure_flags% --release-urlbase=%release_urlbase% | ||
if defined download_arg set configure_flags=%configure_flags% %download_arg% | ||
if defined enable_vtune_arg set configure_flags=%configure_flags% --enable-vtune-profiling | ||
|
@@ -750,7 +754,7 @@ set exit_code=1 | |
goto exit | ||
|
||
:help | ||
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] | ||
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [clang-cl] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] | ||
echo Examples: | ||
echo vcbuild.bat : builds release build | ||
echo vcbuild.bat debug : builds debug build | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a mistake here, sorry. I'll keep the lines setting to 0 when the flag isn't passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed