mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Only specify -m32/-m64 for archs where the variants exist.
This commit is contained in:
parent
17ef7f7d09
commit
23d82b9620
1 changed files with 10 additions and 6 deletions
|
@ -185,12 +185,16 @@ static int linkObjToBinaryGcc(bool sharedLib)
|
|||
break;
|
||||
}
|
||||
|
||||
//FIXME: enforce 64 bit
|
||||
// Only specify -m32/-m64 for architectures where the two variants actually
|
||||
// exist (as e.g. the GCC ARM toolchain doesn't recognize the switches).
|
||||
if (global.params.targetTriple.get64BitArchVariant().getArch() !=
|
||||
llvm::Triple::UnknownArch
|
||||
) {
|
||||
if (global.params.is64bit)
|
||||
args.push_back("-m64");
|
||||
else
|
||||
// Assume 32-bit?
|
||||
args.push_back("-m32");
|
||||
}
|
||||
|
||||
if (opts::createSharedLib && addSoname) {
|
||||
std::string soname = opts::soname;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue