Fix shared library building on Linux for proper loading at runtime with default soname

This commit is contained in:
Wojtek Figat
2021-02-23 22:24:24 +01:00
parent 63a6b704df
commit 747a9bcb98

View File

@@ -74,7 +74,10 @@ namespace Flax.Build.Platforms
if (options.LinkEnv.Output == LinkerOutput.SharedLibrary)
{
args.Add("-shared");
args.Add(string.Format("-Wl,-soname=\"{0}\"", Path.GetFileNameWithoutExtension(outputFilePath)));
var soname = Path.GetFileNameWithoutExtension(outputFilePath);
if (soname.StartsWith("lib"))
soname = soname.Substring(3);
//args.Add(string.Format("-Wl,-soname=\"{0}\"", soname));
}
args.Add(string.Format("-target {0}", ArchitectureName));