diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-11-08 13:40:27 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-09 21:11:14 +0200 |
commit | 1b6a20e7a28dfec5a4e6f9b699490d49c44c9857 (patch) | |
tree | dc31480b964dd7e8dcd3d8f1c026aedf3b74dcaa /test cases | |
parent | a8d3eb3c107c65aa55df982e5d64658fd2e862d9 (diff) | |
download | meson-1b6a20e7a28dfec5a4e6f9b699490d49c44c9857.zip meson-1b6a20e7a28dfec5a4e6f9b699490d49c44c9857.tar.gz meson-1b6a20e7a28dfec5a4e6f9b699490d49c44c9857.tar.bz2 |
llvm: fix static linking
I left a hack patch in a pull request for LLVM, and the result is that
LLVM doesn't link with static builds. The real problem was that some
distros have pkg-config for tinfo, other's don't, so the correct
solution is to use cpp_compiler.find_library if dependency() fails.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/frameworks/15 llvm/meson.build | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build index eb1b8d5..5211006 100644 --- a/test cases/frameworks/15 llvm/meson.build +++ b/test cases/frameworks/15 llvm/meson.build @@ -9,6 +9,12 @@ assert(d.found() == false, 'ancient llvm module found') d = dependency('llvm', optional_modules : 'not-found', required : false) assert(d.found() == true, 'optional module stopped llvm from being found.') +dep_tinfo = dependency('tinfo', required : false) +if not dep_tinfo.found() + cpp = meson.get_compiler('cpp') + dep_tinfo = cpp.find_library('tinfo') +endif + foreach static : [true, false] llvm_dep = dependency( 'llvm', @@ -22,9 +28,8 @@ foreach static : [true, false] 'sum-@0@'.format(name), 'sum.c', dependencies : [ - llvm_dep, + llvm_dep, dep_tinfo, dependency('zlib'), - dependency('glib-2.0'), meson.get_compiler('c').find_library('dl', required : false), ] ) |