diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-05-06 13:43:03 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-06-03 16:03:53 +0300 |
commit | 4828b46b73c0e4874634be0439a1653144e4e0e7 (patch) | |
tree | 9fa28ac0611fc901395c6ae95aac673c58c336fa /mesonbuild/backend/ninjabackend.py | |
parent | 0e9852a457653cb01e477ec041281131b854fa82 (diff) | |
download | meson-4828b46b73c0e4874634be0439a1653144e4e0e7.zip meson-4828b46b73c0e4874634be0439a1653144e4e0e7.tar.gz meson-4828b46b73c0e4874634be0439a1653144e4e0e7.tar.bz2 |
Use relative rpath so builds are reproducible.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 6bd9633..8624d66 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2307,7 +2307,16 @@ rule FORTRAN_DEP_HACK commands += linker.get_option_link_args(self.environment.coredata.compiler_options) # 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) commands += linker.build_rpath_args(self.environment.get_build_dir(), + target_slashname_workaround_dir, self.determine_rpath_dirs(target), target.install_rpath) # Add libraries generated by custom targets |