Merge pull request #17087 from hpvb/fix-finding-mscorlib
More reliably find mscorlib.dll on Linux
This commit is contained in:
commit
3d03bcd063
|
@ -2,6 +2,7 @@
|
||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
from SCons.Script import BoolVariable, Dir, Environment, PathVariable, Variables
|
from SCons.Script import BoolVariable, Dir, Environment, PathVariable, Variables
|
||||||
|
|
||||||
|
@ -150,6 +151,8 @@ def configure(env):
|
||||||
raise RuntimeError('Could not find mono shared library in: ' + mono_lib_path)
|
raise RuntimeError('Could not find mono shared library in: ' + mono_lib_path)
|
||||||
|
|
||||||
copy_file(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
|
copy_file(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
|
||||||
|
|
||||||
|
copy_file(os.path.join(mono_lib_path, 'mono', '4.5'), assemblies_output_dir, 'mscorlib.dll')
|
||||||
else:
|
else:
|
||||||
if mono_static:
|
if mono_static:
|
||||||
raise RuntimeError('mono-static: Not supported with pkg-config. Specify a mono prefix manually')
|
raise RuntimeError('mono-static: Not supported with pkg-config. Specify a mono prefix manually')
|
||||||
|
@ -158,6 +161,7 @@ def configure(env):
|
||||||
|
|
||||||
mono_lib_path = ''
|
mono_lib_path = ''
|
||||||
mono_so_name = ''
|
mono_so_name = ''
|
||||||
|
mono_prefix = subprocess.check_output(["pkg-config", "mono-2", "--variable=prefix"]).strip()
|
||||||
|
|
||||||
tmpenv = Environment()
|
tmpenv = Environment()
|
||||||
tmpenv.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH'))
|
tmpenv.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH'))
|
||||||
|
@ -174,8 +178,7 @@ def configure(env):
|
||||||
raise RuntimeError('Could not find mono shared library in: ' + str(tmpenv['LIBPATH']))
|
raise RuntimeError('Could not find mono shared library in: ' + str(tmpenv['LIBPATH']))
|
||||||
|
|
||||||
copy_file(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
|
copy_file(mono_lib_path, 'bin', 'lib' + mono_so_name + sharedlib_ext)
|
||||||
|
copy_file(os.path.join(mono_prefix, 'lib', 'mono', '4.5'), assemblies_output_dir, 'mscorlib.dll')
|
||||||
copy_file(os.path.join(mono_lib_path, 'mono', '4.5'), assemblies_output_dir, 'mscorlib.dll')
|
|
||||||
|
|
||||||
env.Append(LINKFLAGS='-rdynamic')
|
env.Append(LINKFLAGS='-rdynamic')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue