diff options
author | Mircea Trofin <mtrofin@google.com> | 2022-09-15 21:01:56 -0700 |
---|---|---|
committer | Mircea Trofin <mtrofin@google.com> | 2022-09-19 12:04:17 -0700 |
commit | c625c17b88b4831c99269546fc0ede1667528c6b (patch) | |
tree | 276817bbafe11dcd46b7515be7beaae2a73f6385 /llvm/lib/LTO/LTO.cpp | |
parent | eec19987c04be4c94ffdd27817d4f77e1b7ee0a8 (diff) | |
download | llvm-c625c17b88b4831c99269546fc0ede1667528c6b.zip llvm-c625c17b88b4831c99269546fc0ede1667528c6b.tar.gz llvm-c625c17b88b4831c99269546fc0ede1667528c6b.tar.bz2 |
[lld][thinlto] Include -mllvm options in the thinlto cache key
They may modify thinlto optimization.
This patch only extends support for `-mllvm`. There is another way to
pass llvm flags, `-plugin-opt`, but its processing is different and will
be provided in a subsequent patch.
Differential Revision: https://reviews.llvm.org/D134013
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index cc7be24..10ca98f 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -131,6 +131,8 @@ void llvm::computeLTOCacheKey( AddUnsigned(*Conf.CodeModel); else AddUnsigned(-1); + for (const auto &S : Conf.MllvmArgs) + AddString(S); AddUnsigned(Conf.CGOptLevel); AddUnsigned(Conf.CGFileType); AddUnsigned(Conf.OptLevel); |