[PATCH] D29445: LTO: add a code-model flag
Martell Malone via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 06:44:22 PST 2017
martell added a comment.
In https://reviews.llvm.org/D29445#664931, @pcc wrote:
> I believe that in both linkers we can just write `Config->CodeModel = CMModel;` which would use the existing flag in CommandFlags.h.
I believe this could be useful for setting the default.
Example:
llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
ld.lld %t -o %t2
This would result in the code model being what `CMModel` was set for `x86_64-unknown-linux`
I would like to ask
What happens in the following scenario?
clang -target=x86_64-unknown-linux -mcmodel=large %s -o %t
ld.lld %t -o %t2
Will `CMModel` be the default for that target like above or is the large model information in the object there for the linker to infer?
Repository:
rL LLVM
https://reviews.llvm.org/D29445
More information about the llvm-commits
mailing list