mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-05 22:10:04 +02:00
Only specify -m32/-m64 for archs where the variants exist.
This commit is contained in:
@@ -185,12 +185,16 @@ static int linkObjToBinaryGcc(bool sharedLib)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//FIXME: enforce 64 bit
|
// Only specify -m32/-m64 for architectures where the two variants actually
|
||||||
if (global.params.is64bit)
|
// exist (as e.g. the GCC ARM toolchain doesn't recognize the switches).
|
||||||
args.push_back("-m64");
|
if (global.params.targetTriple.get64BitArchVariant().getArch() !=
|
||||||
else
|
llvm::Triple::UnknownArch
|
||||||
// Assume 32-bit?
|
) {
|
||||||
args.push_back("-m32");
|
if (global.params.is64bit)
|
||||||
|
args.push_back("-m64");
|
||||||
|
else
|
||||||
|
args.push_back("-m32");
|
||||||
|
}
|
||||||
|
|
||||||
if (opts::createSharedLib && addSoname) {
|
if (opts::createSharedLib && addSoname) {
|
||||||
std::string soname = opts::soname;
|
std::string soname = opts::soname;
|
||||||
|
|||||||
Reference in New Issue
Block a user