[compiler-rt] 95f67bb - [compiler-rt] [test] Only pass -incremental:no to the linker for MSVC/clang-cl
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 01:09:31 PDT 2023
Author: Martin Storsjö
Date: 2023-04-06T11:07:42+03:00
New Revision: 95f67bbc9fbde160f9696b0be4ebb5b845813a4b
URL: https://github.com/llvm/llvm-project/commit/95f67bbc9fbde160f9696b0be4ebb5b845813a4b
DIFF: https://github.com/llvm/llvm-project/commit/95f67bbc9fbde160f9696b0be4ebb5b845813a4b.diff
LOG: [compiler-rt] [test] Only pass -incremental:no to the linker for MSVC/clang-cl
The target_is_msvc variable in lit.cfg.py matches a similar pattern
used in the asan lit.cfg.py.
Differential Revision: https://reviews.llvm.org/D147664
Added:
Modified:
compiler-rt/test/profile/lit.cfg.py
Removed:
################################################################################
diff --git a/compiler-rt/test/profile/lit.cfg.py b/compiler-rt/test/profile/lit.cfg.py
index de8840b770d81..9a96f472d40cf 100644
--- a/compiler-rt/test/profile/lit.cfg.py
+++ b/compiler-rt/test/profile/lit.cfg.py
@@ -1,6 +1,7 @@
# -*- Python -*-
import os
+import re
def get_required_attr(config, attr_name):
attr_value = getattr(config, attr_name, None)
@@ -22,9 +23,11 @@ def get_required_attr(config, attr_name):
config.profile_lit_binary_dir is not None:
config.test_exec_root = os.path.join(config.profile_lit_binary_dir, config.name)
+target_is_msvc = bool(re.match(r'.*-windows-msvc$', config.target_triple))
+
if config.host_os in ['Linux']:
extra_link_flags = ["-ldl"]
-elif config.host_os in ['Windows']:
+elif target_is_msvc:
# InstrProf is incompatible with incremental linking. Disable it as a
# workaround.
extra_link_flags = ["-Wl,-incremental:no"]
More information about the llvm-commits
mailing list