[PATCH] D122110: [Clang] Set -mlinker-version explicitly in the lto test
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 20 18:01:47 PDT 2022
phosek created this revision.
phosek added reviewers: smeenai, int3, oontvoo, thakis.
Herald added subscribers: ormris, steven_wu, hiraditya, inglorion.
Herald added a project: All.
phosek requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This test assumes that the driver will set -object_path_lto linker
flag and it requests the platform linker with -fuse-ld=. When lld is
used as the host linker, the host linker version is unset and so
Clang won't set -object_path_lto since that flag is set conditionally
only when linker version is at least 116. We set the linker version
explicitly to make sure that -object_path_lto is set. That approach
is already used elsewhere in the test.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122110
Files:
clang/test/Driver/darwin-ld-lto.c
Index: clang/test/Driver/darwin-ld-lto.c
===================================================================
--- clang/test/Driver/darwin-ld-lto.c
+++ clang/test/Driver/darwin-ld-lto.c
@@ -20,12 +20,14 @@
// Check that -object_lto_path is passed correctly to ld64
-// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 %s -flto=full -### 2>&1 \
+// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 %s -flto=full \
+// RUN: -mlinker-version=116 -### 2>&1 \
// RUN: | FileCheck -check-prefix=FULL_LTO_OBJECT_PATH %s
// FULL_LTO_OBJECT_PATH: {{ld(.exe)?"}}
// FULL_LTO_OBJECT_PATH-SAME: "-object_path_lto"
// FULL_LTO_OBJECT_PATH-SAME: {{cc\-[a-zA-Z0-9_]+.o}}"
-// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 %s -flto=thin -### 2>&1 \
+// RUN: %clang -fuse-ld= -target x86_64-apple-darwin10 %s -flto=thin \
+// RUN: -mlinker-version=116 -### 2>&1 \
// RUN: | FileCheck -check-prefix=THIN_LTO_OBJECT_PATH %s
// THIN_LTO_OBJECT_PATH: {{ld(.exe)?"}}
// THIN_LTO_OBJECT_PATH-SAME: "-object_path_lto"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122110.416812.patch
Type: text/x-patch
Size: 1033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220321/52c97820/attachment.bin>
More information about the cfe-commits
mailing list