Skip to content
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

[ASan][Test] Remove hardcoded linker version from test #90147

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

usama54321
Copy link
Member

This is not needed as the correct linker version is detected at configure time and passed to all tests on Darwin.

rdar://125052667

This is not needed as the correct linker version is detected at
configure time and  passed to all tests on Darwin.

rdar://125052667
@llvmbot
Copy link
Collaborator

llvmbot commented Apr 25, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Usama Hameed (usama54321)

Changes

This is not needed as the correct linker version is detected at configure time and passed to all tests on Darwin.

rdar://125052667


Full diff: https://github.com/llvm/llvm-project/pull/90147.diff

1 Files Affected:

  • (modified) compiler-rt/test/asan/TestCases/Darwin/odr-lto.cpp (+1-1)
diff --git a/compiler-rt/test/asan/TestCases/Darwin/odr-lto.cpp b/compiler-rt/test/asan/TestCases/Darwin/odr-lto.cpp
index 90c16776a63b13..8d400800fe9348 100644
--- a/compiler-rt/test/asan/TestCases/Darwin/odr-lto.cpp
+++ b/compiler-rt/test/asan/TestCases/Darwin/odr-lto.cpp
@@ -5,7 +5,7 @@
 
 // RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto -mllvm -asan-use-private-alias
 // RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto -mllvm -asan-use-private-alias
-// RUN: %clangxx_asan_lto %t-1.o %t-2.o -o %t -flto -mlinker-version=133
+// RUN: %clangxx_asan_lto %t-1.o %t-2.o -o %t -flto
 // RUN: %run %t 2>&1 | FileCheck %s
 
 #include <stdio.h>

@@ -5,7 +5,7 @@

// RUN: %clangxx_asan -DPART=0 -c %s -o %t-1.o -flto -mllvm -asan-use-private-alias
// RUN: %clangxx_asan -DPART=1 -c %s -o %t-2.o -flto -mllvm -asan-use-private-alias
// RUN: %clangxx_asan_lto %t-1.o %t-2.o -o %t -flto -mlinker-version=133
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a case where the test needed a minimum version of the linker initially, but now that version is too old?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is explained in e770bc935b04c52e4e7ea7cd4a467d1fddfb4234.

"When building clang with lld, we don't get a default mlinker-version [1]. This causes us to not pass -lto_library to ld64 [2].
Explicitly pass -mlinker-version=133 so we properly pass -lto_library to ld64 and don't get LLVM bitcode version mismatches due to LTO."

@usama54321 usama54321 merged commit fefac5d into llvm:main Apr 26, 2024
8 checks passed
usama54321 added a commit to usama54321/apple-llvm-project that referenced this pull request Apr 29, 2024
This is not needed as the correct linker version is detected at
configure time and passed to all tests on Darwin.

rdar://125052667
usama54321 added a commit to swiftlang/llvm-project that referenced this pull request Apr 30, 2024
This is not needed as the correct linker version is detected at
configure time and passed to all tests on Darwin.

rdar://125052667
usama54321 added a commit to usama54321/apple-llvm-project that referenced this pull request Apr 30, 2024
This is not needed as the correct linker version is detected at
configure time and passed to all tests on Darwin.

rdar://125052667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants