-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[lldb][test] Explicitly add target triple to no_unique_address Shell tests #112523
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
Conversation
Follow up to llvm#111902. Makes sure all the `no_unique_address` tests are in the same place and we don't rely on the host compiler. Now that we don't compile with the host compiler, this patch also adds `-c` to the compilation command since we don't actually need the linked binary in the test anyway (and on Darwin linking through Clang requires the `xcrun` prefix to set up the SDK paths, etc.). We already do this in `no_unique_address-with-bitfields.cpp` anyway.
|
@llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) ChangesFollow up to #111902. Makes sure all the Now that we don't compile with the host compiler, this patch also adds Full diff: https://github.com/llvm/llvm-project/pull/112523.diff 2 Files Affected:
diff --git a/lldb/test/Shell/SymbolFile/DWARF/no_unique_address-alignment.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-alignment.cpp
similarity index 89%
rename from lldb/test/Shell/SymbolFile/DWARF/no_unique_address-alignment.cpp
rename to lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-alignment.cpp
index 1488199a3ad2d3..e198bf0cafeaac 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/no_unique_address-alignment.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-alignment.cpp
@@ -1,6 +1,6 @@
// XFAIL: *
-// RUN: %clangxx_host -gdwarf -o %t %s
+// RUN: %clang --target=x86_64-apple-macosx -c -gdwarf -o %t %s
// RUN: %lldb %t \
// RUN: -o "expr alignof(OverlappingFields)" \
// RUN: -o "expr sizeof(OverlappingFields)" \
diff --git a/lldb/test/Shell/SymbolFile/DWARF/no_unique_address-base-alignment.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-base-alignment.cpp
similarity index 91%
rename from lldb/test/Shell/SymbolFile/DWARF/no_unique_address-base-alignment.cpp
rename to lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-base-alignment.cpp
index 15d8de0e3ee988..c4bcfc473277f6 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/no_unique_address-base-alignment.cpp
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/no_unique_address-base-alignment.cpp
@@ -1,6 +1,6 @@
// XFAIL: *
-// RUN: %clangxx_host -gdwarf -o %t %s
+// RUN: %clang --target=x86_64-apple-macosx -c -gdwarf -o %t %s
// RUN: %lldb %t \
// RUN: -o "expr alignof(OverlappingDerived)" \
// RUN: -o "expr sizeof(OverlappingDerived)" \
|
labath
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just note that %clang_host is not the host compiler (in the way that I understand the term). It's the clang we've just built, configured to build for the (current) host.
Ooh I see, I didn't realize that. When would we not want to use EDIT: Ah nevermind, part of the |
Follow up to #111902.
Makes sure all the
no_unique_addresstests are in the same place and we don't rely on the host target triple (which means we don't need to account for[[msvc::no_unique_address]]on Windows).Now that we don't compile with the host compiler, this patch also adds
-cto the compilation command since we don't actually need the linked binary in the test anyway (and on Darwin linking through Clang requires thexcrunprefix to set up the SDK paths, etc.). We already do this inno_unique_address-with-bitfields.cppanyway.