-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[libcxx] Enable '-fdelayed-template-parsing' for clang-cl libcxx tests #70092
Conversation
104be85
to
55e0af7
Compare
This patch enables '-fdelayed-template-parsing' in clang-cl based libcxx tests. This flag was disabled by default in PR#69431, which causes this test to fail.
55e0af7
to
abec413
Compare
@llvm/pr-subscribers-libcxx Author: Haowei (zeroomega) ChangesThis patch enables '-fdelayed-template-parsing' in clang-cl based libcxx Full diff: https://github.com/llvm/llvm-project/pull/70092.diff 2 Files Affected:
diff --git a/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
index 50d28eb67c77b78..829f41cd5607c59 100644
--- a/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
@@ -5,7 +5,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
config.substitutions.append(('%{compile_flags}',
- '-fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include
+ '-fms-runtime-lib=' + config.fms_runtime_lib + ' -fdelayed-template-parsing' + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include
))
config.substitutions.append(('%{link_flags}',
'-nostdlib -L %{lib} -lc++ -l' + config.cxx_lib
diff --git a/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
index 4baaad765a92d38..8c643081d8c152c 100644
--- a/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
+++ b/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in
@@ -4,8 +4,10 @@
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
+# clang-cl by default disabled '-fdelayed-template-parsing'. Explicitly enable
+# it here for tests.
config.substitutions.append(('%{compile_flags}',
- '-fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include
+ '-fms-runtime-lib=' + config.fms_runtime_lib + ' -fdelayed-template-parsing' + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include
))
config.substitutions.append(('%{link_flags}',
'-nostdlib -L %{lib} -llibc++ -l' + config.cxx_lib
|
If I recall correctly Does libc++ want to support a non-conforming, legacy, MSVC extension? |
In #69431 @ChuanqiXu9 suggested enabling |
Since there's already an issue for the failure, I would be OK XFAIL'ing the failing test. Would you like me to send the PR? |
Yeah, same here. I would rather not be building the tests with non-standard arguments. |
I sent #70422 which XFAIL's the affected tests. |
Thanks @petrhosek, I'll close this then. |
This patch enables '-fdelayed-template-parsing' in clang-cl based libcxx
tests. This flag was disabled by default in PR#69431, which causes this
test to fail.