fix failing Rust test cases

pull/1922/head
Adam C. Foltzer 8 years ago
parent f4d13e180f
commit 35fae9d019
  1. 13
      mesonbuild/backend/ninjabackend.py
  2. 8
      mesonbuild/compilers.py
  3. 2
      test cases/rust/2 sharedlib/installed_files.txt

@ -1188,8 +1188,21 @@ int dummy;
# against are dynamic, otherwise we'll end up with
# multiple implementations of crates
args += ['-C', 'prefer-dynamic']
# build the usual rpath arguments as well...
# Set runtime-paths so we can run executables without needing to set
# LD_LIBRARY_PATH, etc in the environment. Doesn't work on Windows.
if '/' in target.name or '\\' in target.name:
# Target names really should not have slashes in them, but
# unfortunately we did not check for that and some downstream projects
# now have them. Once slashes are forbidden, remove this bit.
target_slashname_workaround_dir = os.path.join(os.path.split(target.name)[0],
self.get_target_dir(target))
else:
target_slashname_workaround_dir = self.get_target_dir(target)
rpath_args = rustc.build_rpath_args(self.environment.get_build_dir(),
target_slashname_workaround_dir,
self.determine_rpath_dirs(target),
target.install_rpath)
# ... but then add rustc's sysroot to account for rustup

@ -1546,7 +1546,7 @@ class MonoCompiler(Compiler):
def split_shlib_to_parts(self, fname):
return None, fname
def build_rpath_args(self, build_dir, rpath_paths, install_rpath):
def build_rpath_args(self, build_dir, from_dir, rpath_paths, install_rpath):
return []
def get_dependency_gen_args(self, outtarget, outfile):
@ -1627,7 +1627,7 @@ class JavaCompiler(Compiler):
def split_shlib_to_parts(self, fname):
return None, fname
def build_rpath_args(self, build_dir, rpath_paths, install_rpath):
def build_rpath_args(self, build_dir, from_dir, rpath_paths, install_rpath):
return []
def get_dependency_gen_args(self, outtarget, outfile):
@ -1809,8 +1809,8 @@ class RustCompiler(Compiler):
def get_buildtype_args(self, buildtype):
return rust_buildtype_args[buildtype]
def build_rpath_args(self, build_dir, rpath_paths, install_rpath):
return build_unix_rpath_args(build_dir, rpath_paths, install_rpath)
def build_rpath_args(self, build_dir, from_dir, rpath_paths, install_rpath):
return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, install_rpath)
def get_sysroot(self):
cmd = self.exelist + ['--print', 'sysroot']

@ -1,2 +1,2 @@
usr/bin/prog?exe
usr/lib/libstuff.rlib
usr/lib/libstuff.so

Loading…
Cancel
Save