summaryrefslogtreecommitdiffstats
path: root/llvm/test/ThinLTO/X86/save_objects.ll
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2019-04-29 21:39:54 +0000
committerSteven Wu <stevenwu@apple.com>2019-04-29 21:39:54 +0000
commit6c9f6fd11b6503f2b884554cbb5dbbe86163634b (patch)
treefc079788796a0a9a4ec9cb03a940c569bd4df96c /llvm/test/ThinLTO/X86/save_objects.ll
parent5f789bafa1e2f507f16ca48b13693d8676bc6450 (diff)
downloadbcm5719-llvm-6c9f6fd11b6503f2b884554cbb5dbbe86163634b.tar.gz
bcm5719-llvm-6c9f6fd11b6503f2b884554cbb5dbbe86163634b.zip
[ThinLTO] Adding architecture name into saved object filename
Summary: For ThinLTOCodegenerator, it has an option to save the object file outputs into a directory which is essential for debug info. Tools like lldb and dsymutil will look for these object files for debug info. On Darwin platform, you can link fat binaries with one single clang driver invocation like: $ clang -arch x86_64 -arch i386 -Wl,-object_path_lto,$TMPDIR ... Unfornately, the output object files for one architecture is going to overwrite the previous ones and one architecture slice will end up with no debug info. One example for this is to turn on ThinLTO for sanitizer dylibs in compiler-rt project. To fix the issue, add the name for the architecture into the name of the output object file. rdar://problem/35482935 Reviewers: tejohnson, bd1976llvm, dexonsmith, JDevlieghere Reviewed By: dexonsmith Subscribers: mehdi_amini, aprantl, inglorion, eraman, hiraditya, jkorous, dang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60924 llvm-svn: 359508
Diffstat (limited to 'llvm/test/ThinLTO/X86/save_objects.ll')
-rw-r--r--llvm/test/ThinLTO/X86/save_objects.ll3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/ThinLTO/X86/save_objects.ll b/llvm/test/ThinLTO/X86/save_objects.ll
index 4e12aee3dd8..b9a9c983f83 100644
--- a/llvm/test/ThinLTO/X86/save_objects.ll
+++ b/llvm/test/ThinLTO/X86/save_objects.ll
@@ -20,6 +20,9 @@
; RUN: ls %t.thin.out | count 2
; RUN: ls %t.cache | count 3
+; Check the name of object in directory has arch name included.
+; RUN: ls %t.thin.out | grep x86_64.thinlto.o | count 2
+
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
OpenPOWER on IntegriCloud