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

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

Issue 1510973005: [Chromecast] GN - Only apply linker flags for arm (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Style fix. Created 5 years 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 | no next file » | 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/chromecast_build.gni") 5 import("//build/config/chromecast_build.gni")
6 6
7 assert(is_chromecast) 7 assert(is_chromecast)
8 8
9 config("static_config") { 9 config("static_config") {
10 ldflags = [ 10 ldflags = [
11 # We want to statically link libstdc++/libgcc. 11 # We want to statically link libstdc++/libgcc.
12 "-static-libstdc++", 12 "-static-libstdc++",
13 "-static-libgcc", 13 "-static-libgcc",
14 ] 14 ]
15 } 15 }
16 16
17 config("executable_config") { 17 config("executable_config") {
18 ldflags = [ 18 if (current_cpu == "arm") {
19 # Export stdlibc++ and libgcc symbols to force shlibs to refer to these 19 ldflags = [
20 # symbols from the executable. 20 # Export stdlibc++ and libgcc symbols to force shlibs to refer to these
21 "-Wl,--export-dynamic", 21 # symbols from the executable.
22 "-Wl,--export-dynamic",
22 23
23 "-lm", # stdlibc++ requires math.h 24 "-lm", # stdlibc++ requires math.h
24 25
25 # In case we redefined stdlibc++ symbols (e.g. tc_malloc) 26 # In case we redefined stdlibc++ symbols (e.g. tc_malloc)
26 "-Wl,--allow-multiple-definition", 27 "-Wl,--allow-multiple-definition",
27 28
28 "-Wl,--whole-archive", 29 "-Wl,--whole-archive",
29 "-l:libstdc++.a", 30 "-l:libstdc++.a",
30 "-l:libgcc.a", 31 "-l:libgcc.a",
31 "-Wl,--no-whole-archive", 32 "-Wl,--no-whole-archive",
32 ] 33 ]
33 34
34 # Despite including libstdc++/libgcc archives, we still need to specify 35 # Despite including libstdc++/libgcc archives, we still need to specify
35 # static linking for them in order to prevent the executable from having a 36 # static linking for them in order to prevent the executable from having a
36 # dynamic dependency on them. 37 # dynamic dependency on them.
37 configs = [ ":static_config" ] 38 configs = [ ":static_config" ]
39 }
38 } 40 }
39 41
40 config("shared_library_config") { 42 config("shared_library_config") {
41 configs = [ ":static_config" ] 43 if (current_cpu == "arm") {
44 configs = [ ":static_config" ]
45 }
42 } 46 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698