[PATCH] D147664: [compiler-rt] [test] Only pass -incremental:no to the linker for MSVC/clang-cl
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 14:54:48 PDT 2023
mstorsjo created this revision.
mstorsjo added reviewers: phosek, alvinhochun, vitalybuka.
Herald added subscribers: Enna1, dberris.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
The target_is_msvc variable in lit.cfg.py matches a similar pattern
used in the asan lit.cfg.py.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147664
Files:
compiler-rt/test/profile/lit.cfg.py
Index: compiler-rt/test/profile/lit.cfg.py
===================================================================
--- compiler-rt/test/profile/lit.cfg.py
+++ 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 @@
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"]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147664.511217.patch
Type: text/x-patch
Size: 839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230405/1aaf16bf/attachment.bin>
More information about the llvm-commits
mailing list