Commit Graph

10 Commits

Author SHA1 Message Date
Mehdi Amini 3406bb6748 Fix test/Driver/embed-bitcode.c on non-Darwin host by setting the target explicitly
llvm-svn: 292964
2017-01-24 18:49:49 +00:00
Mehdi Amini 04e1a0a171 Forward -bitcode_process_mode to ld64 in marker-only mode
Reviewers: steven_wu

Subscribers: cfe-commits

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

llvm-svn: 292961
2017-01-24 18:15:21 +00:00
Greg Parker efa3185ee4 [test] Remove an unwanted match for `UNSUPPORTED:`.
llvm-svn: 292568
2017-01-20 02:12:22 +00:00
Steven Wu 844ab6a012 [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

llvm-svn: 287084
2016-11-16 06:06:44 +00:00
Steven Wu 1257cd8fd8 [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

llvm-svn: 269961
2016-05-18 17:04:52 +00:00
Steven Wu 27fb5227ec 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

llvm-svn: 269202
2016-05-11 16:26:03 +00:00
Daniel Sanders c1eb1e0419 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).

llvm-svn: 262409
2016-03-01 21:57:22 +00:00
Daniel Sanders 946b556c88 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).

llvm-svn: 262350
2016-03-01 17:15:11 +00:00
Steven Wu f406b07a17 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.

llvm-svn: 262286
2016-03-01 01:24:54 +00:00
Steven Wu 574b0f2f9c 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

llvm-svn: 262282
2016-03-01 01:07:58 +00:00