OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 if (current_cpu == "arm") { | 6 if (current_cpu == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
10 import("//build/config/mips.gni") | 10 import("//build/config/mips.gni") |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 "nan=__builtin_nan", | 547 "nan=__builtin_nan", |
548 ] | 548 ] |
549 } | 549 } |
550 | 550 |
551 defines += [ | 551 defines += [ |
552 "USE_STLPORT=1", | 552 "USE_STLPORT=1", |
553 "_STLP_USE_PTR_SPECIALIZATIONS=1", | 553 "_STLP_USE_PTR_SPECIALIZATIONS=1", |
554 "__GNU_SOURCE=1", # Necessary for clone(). | 554 "__GNU_SOURCE=1", # Necessary for clone(). |
555 ] | 555 ] |
556 | 556 |
557 ldflags += [ | 557 # TODO(jdduke) Re-enable on mips after resolving linking |
558 "-Wl,--warn-shared-textrel", | 558 # issues with libc++ (crbug.com/456380). |
559 "-nostdlib", | 559 if (cpu_arch != "mipsel" && cpu_arch != "mips64el") { |
560 ] | 560 ldflags += [ "-Wl,--warn-shared-textrel" ] |
| 561 } |
| 562 ldflags += [ "-nostdlib" ] |
561 | 563 |
562 # NOTE: The stlport header include paths below are specified in cflags | 564 # NOTE: The stlport header include paths below are specified in cflags |
563 # rather than include_dirs because they need to come after include_dirs. | 565 # rather than include_dirs because they need to come after include_dirs. |
564 # Think of them like system headers, but don't use '-isystem' because the | 566 # Think of them like system headers, but don't use '-isystem' because the |
565 # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit | 567 # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit |
566 # strange errors. The include ordering here is important; change with | 568 # strange errors. The include ordering here is important; change with |
567 # caution. | 569 # caution. |
568 android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport" | 570 android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport" |
569 | 571 |
570 cflags += [ "-isystem" + | 572 cflags += [ "-isystem" + |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 # can be removed at link time with --gc-sections. | 944 # can be removed at link time with --gc-sections. |
943 "-fdata-sections", | 945 "-fdata-sections", |
944 "-ffunction-sections", | 946 "-ffunction-sections", |
945 ] | 947 ] |
946 common_optimize_on_ldflags = [] | 948 common_optimize_on_ldflags = [] |
947 | 949 |
948 if (is_android) { | 950 if (is_android) { |
949 if (!using_sanitizer) { | 951 if (!using_sanitizer) { |
950 common_optimize_on_cflags += [ "-fomit-frame-pointer" ] | 952 common_optimize_on_cflags += [ "-fomit-frame-pointer" ] |
951 } | 953 } |
952 common_optimize_on_ldflags += [ | 954 |
953 # Warn in case of text relocations. | 955 # TODO(jdduke) Re-enable on mips after resolving linking |
954 "-Wl,--warn-shared-textrel", | 956 # issues with libc++ (crbug.com/456380). |
955 ] | 957 if (cpu_arch != "mipsel" && cpu_arch != "mips64el") { |
| 958 common_optimize_on_ldflags += [ |
| 959 # Warn in case of text relocations. |
| 960 "-Wl,--warn-shared-textrel", |
| 961 ] |
| 962 } |
956 } | 963 } |
957 | 964 |
958 if (is_mac) { | 965 if (is_mac) { |
959 if (symbol_level == 2) { | 966 if (symbol_level == 2) { |
960 # Mac dead code stripping requires symbols. | 967 # Mac dead code stripping requires symbols. |
961 common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] | 968 common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] |
962 } | 969 } |
963 } else { | 970 } else { |
964 # Non-Mac Posix linker flags. | 971 # Non-Mac Posix linker flags. |
965 common_optimize_on_ldflags += [ | 972 common_optimize_on_ldflags += [ |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 cflags += [ "-gsplit-dwarf" ] | 1081 cflags += [ "-gsplit-dwarf" ] |
1075 } | 1082 } |
1076 } | 1083 } |
1077 } | 1084 } |
1078 | 1085 |
1079 config("no_symbols") { | 1086 config("no_symbols") { |
1080 if (!is_win) { | 1087 if (!is_win) { |
1081 cflags = [ "-g0" ] | 1088 cflags = [ "-g0" ] |
1082 } | 1089 } |
1083 } | 1090 } |
OLD | NEW |