| OLD | NEW |
| (Empty) |
| 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 2 # for details. All rights reserved. Use of this source code is governed by a | |
| 3 # BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 # Definitions for building standalone Dart binaries to run on Fuchsia. | |
| 6 | |
| 7 { | |
| 8 'variables': { | |
| 9 'fuchsia_tools': '<(PRODUCT_DIR)/../../third_party/fuchsia_tools/', | |
| 10 }, # variables | |
| 11 'target_defaults': { | |
| 12 'configurations': { | |
| 13 'Dart_Fuchsia_Base': { | |
| 14 'abstract': 1, | |
| 15 'cflags': [ | |
| 16 '-Werror', | |
| 17 '<@(common_gcc_warning_flags)', | |
| 18 '-Wnon-virtual-dtor', | |
| 19 '-Wvla', | |
| 20 '-Woverloaded-virtual', | |
| 21 '-g3', | |
| 22 '-ggdb3', | |
| 23 '-fno-rtti', | |
| 24 '-fno-exceptions', | |
| 25 '-fstack-protector', | |
| 26 '-Wa,--noexecstack', | |
| 27 ], | |
| 28 'target_conditions': [ | |
| 29 ['_toolset=="target"', { | |
| 30 'cflags!': [ | |
| 31 '-pthread', # Not supported by Android toolchain. | |
| 32 ], | |
| 33 }], | |
| 34 ], | |
| 35 }, | |
| 36 'Dart_Fuchsia_Debug': { | |
| 37 'abstract': 1, | |
| 38 'defines': [ | |
| 39 'DEBUG', | |
| 40 ], | |
| 41 'cflags': [ | |
| 42 '-fno-omit-frame-pointer', | |
| 43 ], | |
| 44 }, | |
| 45 'Dart_Fuchsia_Release': { | |
| 46 'abstract': 1, | |
| 47 'defines': [ | |
| 48 'NDEBUG', | |
| 49 ], | |
| 50 'cflags!': [ | |
| 51 '-O2', | |
| 52 '-Os', | |
| 53 ], | |
| 54 'cflags': [ | |
| 55 '-fno-omit-frame-pointer', | |
| 56 '-fdata-sections', | |
| 57 '-ffunction-sections', | |
| 58 '-O3', | |
| 59 ], | |
| 60 }, | |
| 61 'Dart_Fuchsia_Product': { | |
| 62 'abstract': 1, | |
| 63 'defines': [ | |
| 64 'NDEBUG', | |
| 65 'PRODUCT', | |
| 66 ], | |
| 67 'cflags!': [ | |
| 68 '-O2', | |
| 69 '-Os', | |
| 70 ], | |
| 71 'cflags': [ | |
| 72 '-fdata-sections', | |
| 73 '-ffunction-sections', | |
| 74 '-O3', | |
| 75 ], | |
| 76 }, | |
| 77 'Dart_Fuchsia_x64_Base': { | |
| 78 'abstract': 1, | |
| 79 'variables': { | |
| 80 'fuchsia_sysroot': '<(fuchsia_tools)/sysroot/x86_64', | |
| 81 'fuchsia_include': '<(fuchsia_sysroot)/usr/include', | |
| 82 'fuchsia_lib': '<(fuchsia_sysroot)/usr/lib', | |
| 83 }, | |
| 84 'target_conditions': [ | |
| 85 ['_toolset=="target"', { | |
| 86 'defines': [ | |
| 87 'TARGET_OS_FUCHSIA', | |
| 88 ], | |
| 89 'cflags': [ | |
| 90 '--sysroot=<(fuchsia_sysroot)', | |
| 91 '-I<(fuchsia_include)', | |
| 92 '-fno-threadsafe-statics', | |
| 93 ], | |
| 94 'ldflags': [ | |
| 95 'x64', '>(_type)', 'target', | |
| 96 '-nostdlib', | |
| 97 '-T<(fuchsia_sysroot)/usr/user.ld', | |
| 98 '-L<(fuchsia_lib)', | |
| 99 '-Wl,-z,noexecstack', | |
| 100 '-Wl,-z,now', | |
| 101 '-Wl,-z,relro', | |
| 102 '<(fuchsia_lib)/crt1.o', | |
| 103 '<(fuchsia_lib)/crti.o', | |
| 104 ], | |
| 105 'ldflags!': [ | |
| 106 '-pthread', | |
| 107 ], | |
| 108 }], | |
| 109 ['_toolset=="host"', { | |
| 110 'cflags': [ '-pthread' ], | |
| 111 'ldflags': [ '-pthread' ], | |
| 112 }], | |
| 113 ], | |
| 114 }, | |
| 115 'Dart_Fuchsia_arm64_Base': { | |
| 116 'abstract': 1, | |
| 117 'variables': { | |
| 118 'fuchsia_sysroot': '<(fuchsia_tools)/sysroot/arm64', | |
| 119 'fuchsia_include': '<(fuchsia_sysroot)/usr/include', | |
| 120 'fuchsia_lib': '<(fuchsia_sysroot)/usr/lib', | |
| 121 }, | |
| 122 'target_conditions': [ | |
| 123 ['_toolset=="target"', { | |
| 124 'defines': [ | |
| 125 'TARGET_OS_FUCHSIA', | |
| 126 ], | |
| 127 'cflags': [ | |
| 128 '--sysroot=<(fuchsia_sysroot)', | |
| 129 '-I<(fuchsia_include)', | |
| 130 '-fno-threadsafe-statics', | |
| 131 ], | |
| 132 'ldflags': [ | |
| 133 'arm64', '>(_type)', 'target', | |
| 134 '-nostdlib', | |
| 135 '-L<(fuchsia_lib)', | |
| 136 '-Wl,-z,noexecstack', | |
| 137 '-Wl,-z,now', | |
| 138 '-Wl,-z,relro', | |
| 139 ], | |
| 140 'ldflags!': [ | |
| 141 '-pthread', | |
| 142 ], | |
| 143 }], | |
| 144 ['_toolset=="host"', { | |
| 145 'cflags': [ '-pthread' ], | |
| 146 'ldflags': [ '-pthread' ], | |
| 147 }], | |
| 148 ], | |
| 149 }, # Dart_Fuchsia_arm64_Base | |
| 150 }, # configurations | |
| 151 }, # target_defaults | |
| 152 } | |
| OLD | NEW |