diff options
| author | Teresa Johnson <tejohnson@google.com> | 2016-05-17 14:45:30 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2016-05-17 14:45:30 +0000 |
| commit | bbd10b4579ef13707e97a06e7c7b981600f9d9e1 (patch) | |
| tree | bd66e8bb7b08f5a4e68c74c7df8ae5b3e908d8df /llvm/test/tools | |
| parent | 2ea513847c167a93c52d32dcdb96867441458408 (diff) | |
| download | bcm5719-llvm-bbd10b4579ef13707e97a06e7c7b981600f9d9e1.tar.gz bcm5719-llvm-bbd10b4579ef13707e97a06e7c7b981600f9d9e1.zip | |
[ThinLTO] Option to control path of distributed backend files
Summary:
Add support to control where files for a distributed backend (the
individual index files and optional imports files) are created.
This is invoked with a new thinlto-prefix-replace option in the gold
plugin and llvm-lto. If specified, expects a string of the form
"oldprefix:newprefix", and instead of generating these files in the
same directory path as the corresponding bitcode file, will use a path
formed by replacing the bitcode file's path prefix matching oldprefix
with newprefix.
Also add a new replace_path_prefix helper to Path.h in libSupport.
Depends on D19636.
Reviewers: joker.eph
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D19644
llvm-svn: 269771
Diffstat (limited to 'llvm/test/tools')
| -rw-r--r-- | llvm/test/tools/gold/X86/thinlto_prefix_replace.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/tools/gold/X86/thinlto_prefix_replace.ll b/llvm/test/tools/gold/X86/thinlto_prefix_replace.ll new file mode 100644 index 00000000000..5727d96c1f4 --- /dev/null +++ b/llvm/test/tools/gold/X86/thinlto_prefix_replace.ll @@ -0,0 +1,17 @@ +; Check that changing the output path via thinlto-prefix-replace works +; RUN: mkdir -p %T/oldpath +; RUN: opt -module-summary %s -o %T/oldpath/thinlto_prefix_replace.o +; Ensure that there is no existing file at the new path, so we properly +; test the creation of the new file there. +; RUN: rm -f %T/newpath/thinlto_prefix_replace.o.thinlto.bc +; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ +; RUN: --plugin-opt=thinlto \ +; RUN: --plugin-opt=thinlto-index-only \ +; RUN: --plugin-opt=thinlto-prefix-replace="%T/oldpath/:%T/newpath/" \ +; RUN: -shared %T/oldpath/thinlto_prefix_replace.o -o %T/thinlto_prefix_replace +; RUN: ls %T/newpath/thinlto_prefix_replace.o.thinlto.bc + +define void @f() { +entry: + ret void +} |

