Skip to content

[compiler-rt] [MSVC] Detect MSVC as a compiler-id for lit. #108255

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

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler-rt/cmake/base-config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ if("${COMPILER_RT_TEST_COMPILER}" MATCHES "clang[+]*$")
set(COMPILER_RT_TEST_COMPILER_ID Clang)
elseif("${COMPILER_RT_TEST_COMPILER}" MATCHES "clang.*.exe$")
set(COMPILER_RT_TEST_COMPILER_ID Clang)
elseif("${COMPILER_RT_TEST_COMPILER}" MATCHES "cl.exe$")
set(COMPILER_RT_TEST_COMPILER_ID MSVC)
else()
set(COMPILER_RT_TEST_COMPILER_ID GNU)
endif()
Expand Down
3 changes: 3 additions & 0 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ def push_dynamic_library_lookup_path(config, new_path):
# requested it because it makes ASan reports more precise.
config.debug_info_flags.append("-gcodeview")
config.debug_info_flags.append("-gcolumn-info")
elif compiler_id == "MSVC":
config.debug_info_flags = ["/Z7"]
config.cxx_mode_flags = []
elif compiler_id == "GNU":
config.cxx_mode_flags = ["-x c++"]
config.debug_info_flags = ["-g"]
Expand Down
Loading