[all-commits] [llvm/llvm-project] dd5635: [lld-macho] Fix loading same libraries from both L...
Jacket via All-commits
all-commits at lists.llvm.org
Tue Jul 19 14:46:43 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd5635541cd7bbd62cd59b6694dfb759b6e9a0d8
https://github.com/llvm/llvm-project/commit/dd5635541cd7bbd62cd59b6694dfb759b6e9a0d8
Author: Kaining Zhong <zhongkaining.paxos at bytedance.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M lld/MachO/Driver.cpp
M lld/test/MachO/lc-linker-option.ll
Log Message:
-----------
[lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line
This fixes https://github.com/llvm/llvm-project/issues/56059 and
https://github.com/llvm/llvm-project/issues/56440. This is inspired by
tapthaker's patch (https://reviews.llvm.org/D127941), and has reused his
test cases. This patch adds an bool "isCommandLineLoad" to indicate
where archives are from. If lld tries to load the same library loaded
previously by LC_LINKER_OPTION from CLI, it will use this
isCommandLineLoad to determine if it should be affected by -all_load &
-ObjC flags. This also prevents -force_load from affecting archives
loaded previously from CLI without such flag, whereas tapthaker's patch
will fail such test case (introduced by
https://reviews.llvm.org/D128025).
Reviewed By: int3, #lld-macho
Differential Revision: https://reviews.llvm.org/D129556
More information about the All-commits
mailing list