Merge pull request #1926 from trhd/libbug

Fix a missing path issue causing Python traceback.
pull/1163/head
Jussi Pakkanen 7 years ago committed by GitHub
commit c3f59d781d
  1. 4
      mesonbuild/compilers/compilers.py
  2. 6
      test cases/common/154 library at root/lib.c
  3. 5
      test cases/common/154 library at root/main/main.c
  4. 2
      test cases/common/154 library at root/main/meson.build
  5. 3
      test cases/common/154 library at root/meson.build

@ -763,6 +763,10 @@ class Compiler:
# directory. This breaks reproducible builds.
rel_rpaths = []
for p in rpath_paths:
# p can be an empty string for build_dir (relative path), but
# os.path.relpath() below won't like that.
if p == '':
p = build_dir
if p == from_dir:
relative = '' # relpath errors out in this case
else:

@ -0,0 +1,6 @@
#if defined _WIN32 || defined __CYGWIN__
__declspec(dllexport)
#endif
int fn(void) {
return -1;
}

@ -0,0 +1,5 @@
extern int fn(void);
int main() {
return 1 + fn();
}

@ -0,0 +1,2 @@
exe = executable('main', 'main.c', link_with : lib)
test('stuff works', exe)

@ -0,0 +1,3 @@
project('lib@root', 'c')
lib = shared_library('lib', 'lib.c')
subdir('main')
Loading…
Cancel
Save