Commit Graph

10 Commits

Author SHA1 Message Date
Mehdi Amini d231537845 Fix test/Driver/embed-bitcode.c on non-Darwin host by setting the target explicitly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 18:49:49 +00:00
Mehdi Amini 1baa44d1af Forward -bitcode_process_mode to ld64 in marker-only mode
Reviewers: steven_wu

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 18:15:21 +00:00
Greg Parker 39c61e30a9 [test] Remove an unwanted match for `UNSUPPORTED:`.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292568 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 02:12:22 +00:00
Steven Wu 25da1c1bcf [Driver] Infer the correct option to ld64 for -fembed-bitcode
Summary:
-fembed-bitcode infers -bitcode_bundle to ld64 but it is not correctly
passed when using LTO. LTO is a special case of -fembed-bitcode which
it doesn't require embed the bitcode in a special section in the object
file but it requires linker to save that as part of the final executable.

rdar://problem/29274226

Reviewers: mehdi_amini

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16 06:06:44 +00:00
Steven Wu 74f6cf927a [Driver] Fix the case when use -fembed-bitcode and -flto= together
Summary:
-fembed-bitcode was only checking for old style LTO flag (-flto) but not
considering the new -flto= style option. That makes clang output bitcode
embedded in bitcode object when using -flto= and -fembed-bitcode= together.
Now clang should output normal bitcode file when using LTO and ignores
-fembed-bitcode option.

Reviewers: joker.eph

Subscribers: joker.eph, cfe-commits

Differential Revision: http://reviews.llvm.org/D20374

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269961 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-18 17:04:52 +00:00
Steven Wu 22dbcfe84e Embed bitcode in object file (clang cc1 part)
Summary:
Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1
option is used, clang will embed both the input bitcode and cc1
commandline into the bitcode in special sections before compiling to
the object file.  Using -fembed-bitcode-marker will only introduce a
marker in both sections.

Depends on D17390

Reviewers: rsmith

Subscribers: yaron.keren, vsk, cfe-commits

Differential Revision: http://reviews.llvm.org/D17392

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 16:26:03 +00:00
Daniel Sanders edfad5e176 Explicitly select IAS on one more RUN line in new embed-bitcode.c test.
This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:57:22 +00:00
Daniel Sanders d058fcd094 Explicitly select IAS in new embed-bitcode.c test.
This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 17:15:11 +00:00
Steven Wu 9816b0d7b9 Fix the testcase in r262282
-bitcode_bundle is only passed to the darwin ld64 linker and it is only
implemented there. Remove the check on the linker flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 01:24:54 +00:00
Steven Wu c8c8b88b01 Introduce -fembed-bitcode driver option
Summary:
This is the clang driver part of the change to embedded bitcode. This
includes:
1. -fembed-bitcode option which breaks down the compilation into two
stages. The first stage emits optimized bitcode and the second stage
compiles bitcode into object file.
2. -fembed-bitcode-marker option which doesn't really break down to
two stages to speedup the compilation flow.
3. pass the correct linker flag to darwin linker if tool chains supports
embedded bitcode.

Reviewers: rsmith, thakis

Subscribers: thakis, cfe-commits

Differential Revision: http://reviews.llvm.org/D17390

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 01:07:58 +00:00