Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: build/config/posix/BUILD.gn

Issue 2900193003: Use relative path in -L and -Wl,-rpath-link (Closed)
Patch Set: don't print on empty Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/config/posix/sysroot_ld_path.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/clang/clang.gni") 5 import("//build/config/clang/clang.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 import("//build/config/sysroot.gni") 7 import("//build/config/sysroot.gni")
8 import("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 9
10 assert(is_posix) 10 assert(is_posix)
11 11
12 group("posix") { 12 group("posix") {
13 visibility = [ "//:optimize_gn_gen" ] 13 visibility = [ "//:optimize_gn_gen" ]
14 } 14 }
15 15
16 # This is included by reference in the //build/config/compiler:runtime_library 16 # This is included by reference in the //build/config/compiler:runtime_library
17 # config that is applied to all targets. It is here to separate out the logic 17 # config that is applied to all targets. It is here to separate out the logic
18 # that is Posix-only. Please see that target for advice on what should go in 18 # that is Posix-only. Please see that target for advice on what should go in
19 # :runtime_library vs. :compiler. 19 # :runtime_library vs. :compiler.
20 config("runtime_library") { 20 config("runtime_library") {
21 if (!is_mac && !is_ios && sysroot != "") { 21 if (!is_mac && !is_ios && sysroot != "") {
22 # Pass the sysroot to all C compiler variants, the assembler, and linker. 22 # Pass the sysroot to all C compiler variants, the assembler, and linker.
23 cflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ] 23 cflags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
24 asmflags = cflags 24 asmflags = cflags
25 ldflags = cflags 25 ldflags = cflags
26 26
27 # Need to get some linker flags out of the sysroot. 27 # Need to get some linker flags out of the sysroot.
28 ldflags += exec_script("sysroot_ld_path.py", 28 ld_paths = exec_script("sysroot_ld_path.py",
29 [ 29 [
30 rebase_path("//build/linux/sysroot_ld_path.sh", 30 rebase_path("//build/linux/sysroot_ld_path.sh",
31 root_build_dir), 31 root_build_dir),
32 rebase_path(sysroot), 32 rebase_path(sysroot),
33 ], 33 ],
34 "list lines") 34 "list lines")
35 foreach(ld_path, ld_paths) {
36 ld_path = rebase_path(ld_path, root_build_dir)
37 ldflags += [
38 "-L" + ld_path,
39 "-Wl,-rpath-link=" + ld_path,
40 ]
41 }
35 } 42 }
36 } 43 }
OLDNEW
« no previous file with comments | « no previous file | build/config/posix/sysroot_ld_path.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698