[driver] return immediately in addArchSpecificRPath
and getArchSpecificLibPaths
on AIX (#134520)
`addArchSpecificRPath` should immediately return for AIX as AIX doesn't support `rpath` option. `getArchSpecificLibPaths` should return as well as we don't want `-L/ArchSepcificLibPaths` sent to the linker on AIX.
This commit is contained in:
parent
67783eb166
commit
3f8035961f
@ -98,6 +98,8 @@ public:
|
||||
return llvm::DebuggerKind::DBX;
|
||||
}
|
||||
|
||||
path_list getArchSpecificLibPaths() const override { return path_list(); };
|
||||
|
||||
protected:
|
||||
Tool *buildAssembler() const override;
|
||||
Tool *buildLinker() const override;
|
||||
|
@ -1252,6 +1252,9 @@ void tools::addArchSpecificRPath(const ToolChain &TC, const ArgList &Args,
|
||||
options::OPT_fno_rtlib_add_rpath, false))
|
||||
return;
|
||||
|
||||
if (TC.getTriple().isOSAIX()) // TODO: AIX doesn't support -rpath option.
|
||||
return;
|
||||
|
||||
SmallVector<std::string> CandidateRPaths(TC.getArchSpecificLibPaths());
|
||||
if (const auto CandidateRPath = TC.getStdlibPath())
|
||||
CandidateRPaths.emplace_back(*CandidateRPath);
|
||||
|
@ -23,6 +23,7 @@
|
||||
! AIX64-LD-PER-TARGET-DEFAULT-SAME: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}powerpc64-ibm-aix{{/|\\\\}}libflang_rt.runtime.a"
|
||||
! AIX64-LD-PER-TARGET-DEFAULT-SAME: "-lm"
|
||||
! AIX64-LD-PER-TARGET-DEFAULT-SAME: "-lpthread"
|
||||
! AIX64-LD-PER-TARGET-DEFAULT-NOT: "-L/[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}powerpc64-ibm-aix"
|
||||
|
||||
|
||||
! Check powerpc64-ibm-aix 64-bit linking to static flang-rt by option
|
||||
|
Loading…
x
Reference in New Issue
Block a user