]> granicus.if.org Git - clang/commit
[Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO
authorSteven Wu <stevenwu@apple.com>
Fri, 11 Jan 2019 21:16:04 +0000 (21:16 +0000)
committerSteven Wu <stevenwu@apple.com>
Fri, 11 Jan 2019 21:16:04 +0000 (21:16 +0000)
commit27e3ee93074f6cdadfda79bfee6406bc540b88ea
treeac78bf5aa6863c2238d83da1ed610f0a56f3ec9b
parent4c57533ba3d00d3c41b96258eb7b6a4755b55b38
[Darwin][Driver] Don't pass a file as object_path_lto during ThinLTO

Summary:
After r327851, Driver::GetTemporaryPath will create the file rather than
just create a potientially unqine filename. If clang driver pass the
file as parameter as -object_path_lto, ld64 will pass it back to libLTO
as GeneratedObjectsDirectory, which is going to cause a LLVM ERROR if it
is not a directory.
Now during thinLTO, pass a temp directory path to linker instread.

rdar://problem/47194182

Reviewers: arphaman, dexonsmith

Reviewed By: arphaman

Subscribers: mehdi_amini, inglorion, jkorous, cfe-commits

Differential Revision: https://reviews.llvm.org/D56608

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350970 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Driver.h
lib/Driver/Driver.cpp
lib/Driver/ToolChains/Darwin.cpp
test/Driver/darwin-ld-lto.c