Only pass --copy-dt-needed-entries with GNU linker

This commit is contained in:
2023-02-05 13:38:29 +02:00
parent 591b45d2e8
commit c51a923160
2 changed files with 4 additions and 3 deletions

View File

@@ -75,7 +75,8 @@ namespace Flax.Build.Platforms
args.Add("-Wl,-rpath,\"\\$ORIGIN\"");
//args.Add("-Wl,--as-needed");
args.Add("-Wl,--copy-dt-needed-entries");
if (LdKind == "bfd")
args.Add("-Wl,--copy-dt-needed-entries");
args.Add("-Wl,--hash-style=gnu");
//args.Add("-Wl,--build-id");

View File

@@ -107,8 +107,8 @@ namespace Flax.Build.Platforms
}
if (LdPath == null)
{
LdPath = UnixPlatform.Which("ld");
LdKind = null;
LdPath = UnixPlatform.Which("ld"); // ld.bfd
LdKind = "bfd";
}
}
else