diff options
author | Michal Gorny <mgorny@gentoo.org> | 2019-03-06 14:03:18 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2019-03-06 14:03:18 +0000 |
commit | a2cc148f9fee10ff749a101975a23703e5460d0b (patch) | |
tree | b3dbee830d16a9ea4ef9dcb18871b8db4bf684e7 /lldb/lit/helper/build.py | |
parent | f2eb8caa3fbb4338c061782d9b414fcadd8f9e40 (diff) | |
download | bcm5719-llvm-a2cc148f9fee10ff749a101975a23703e5460d0b.tar.gz bcm5719-llvm-a2cc148f9fee10ff749a101975a23703e5460d0b.zip |
[lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD
Pass appropriate -L and -Wl,-rpath flags pointing out to the LLVM
library directory on NetBSD. This is necessary since clang on NetBSD
requires libc++ but it is not installed as part of the system
by default. For the purpose of running buildbot, we want LLDB to use
just-built libc++.
Differential Revision: https://reviews.llvm.org/D58630
llvm-svn: 355502
Diffstat (limited to 'lldb/lit/helper/build.py')
-rwxr-xr-x | lldb/lit/helper/build.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/lit/helper/build.py b/lldb/lit/helper/build.py index 1b8227d163c..d82c688de7b 100755 --- a/lldb/lit/helper/build.py +++ b/lldb/lit/helper/build.py @@ -35,6 +35,13 @@ parser.add_argument('--compiler', required=True, help='Path to a compiler executable, or one of the values [any, msvc, clang-cl, gcc, clang]') +parser.add_argument('--libs-dir', + metavar='directory', + dest='libs_dir', + required=False, + action='append', + help='If specified, a path to linked libraries to be passed via -L') + parser.add_argument('--tools-dir', metavar='directory', dest='tools_dir', @@ -225,6 +232,7 @@ class Builder(object): self.nodefaultlib = args.nodefaultlib self.verbose = args.verbose self.obj_ext = obj_ext + self.lib_paths = args.libs_dir def _exe_file_name(self): assert self.mode != 'compile' @@ -650,6 +658,9 @@ class GccBuilder(Builder): if sys.platform == 'darwin': main_symbol = '_main' args.append('-Wl,-e,' + main_symbol) + if sys.platform.startswith('netbsd'): + for x in self.lib_paths: + args += ['-L' + x, '-Wl,-rpath,' + x] args.extend(['-o', self._exe_file_name()]) args.extend(self._obj_file_names()) |