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

Side by Side Diff: src/untrusted/irt/irt.gyp

Issue 140653005: Adds tls_edit utility which patches irt_core.nexe's TLS usage. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: gyp builds with host toolsets should not inherit target flags for arm and mips Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 { 5 {
6 'includes': [ 6 'includes': [
7 '../../../build/common.gypi', 7 '../../../build/common.gypi',
8 ], 8 ],
9 'variables': { 9 'variables': {
10 'irt_sources': [ 10 'irt_sources': [
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 'irt_core_resource.c', 45 'irt_core_resource.c',
46 ], 46 ],
47 'irt_browser': [ 47 'irt_browser': [
48 'irt_interfaces_ppapi.c', 48 'irt_interfaces_ppapi.c',
49 'irt_ppapi.c', 49 'irt_ppapi.c',
50 'irt_manifest.c', 50 'irt_manifest.c',
51 ], 51 ],
52 }, 52 },
53 'targets': [ 53 'targets': [
54 { 54 {
55 'target_name': 'irt_core_nexe', 55 'target_name': 'tls_edit',
56 'type': 'executable',
57 'toolsets': ['host'],
58 'sources': [
59 'tls_edit.c',
60 ],
61 'dependencies': [
62 '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform',
63 '<(DEPTH)/native_client/src/trusted/validator_ragel/rdfa_validator.gyp:r dfa_validator',
64 ],
65 },
66 {
67 'target_name': 'irt_core_raw_nexe',
56 'type': 'none', 68 'type': 'none',
57 'variables': { 69 'variables': {
58 'nexe_target': 'irt_core', 70 'nexe_target': 'irt_core_raw',
59 'build_glibc': 0, 71 'build_glibc': 0,
60 'build_newlib': 0, 72 'build_newlib': 0,
61 'build_irt': 1, 73 'build_irt': 1,
62 }, 74 },
63 'sources': ['<@(irt_sources)', '<@(irt_nonbrowser)'], 75 'sources': ['<@(irt_sources)', '<@(irt_nonbrowser)'],
64 'link_flags': [ 76 'link_flags': [
65 '-lsrpc', 77 '-lsrpc',
66 '-limc_syscalls', 78 '-limc_syscalls',
67 '-lplatform', 79 '-lplatform',
68 '-lgio', 80 '-lgio',
69 '-lm', 81 '-lm',
70 ], 82 ],
71 'conditions': [
72 # See comment in native_client/src/untrusted/irt/nacl.scons
73 # regarding -Ttext-segment.
74 ['target_arch=="arm"', {
75 'sources': ['<@(irt_sources)',
76 'aeabi_read_tp.S'],
77 }],
78 ],
79 'dependencies': [ 83 'dependencies': [
80 '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib', 84 '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
81 '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib', 85 '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
82 '<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:srpc_lib', 86 '<(DEPTH)/native_client/src/shared/srpc/srpc.gyp:srpc_lib',
83 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib', 87 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib',
84 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib', 88 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
85 '<(DEPTH)/native_client/tools.gyp:prep_toolchain', 89 '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
86 ], 90 ],
87 }, 91 },
88 { 92 {
93 'target_name': 'irt_core_nexe',
94 'type': 'none',
95 'dependencies': [
96 'irt_core_raw_nexe',
97 'tls_edit#host',
98 ],
99 'conditions': [
100 ['target_arch=="arm"', {
101 'actions': [
102 {
103 'action_name': 'tls_edit_irt_arm',
104 'message': 'Patching TLS for irt_core (arm)',
105 'msvs_cygwin_shell': 0,
106 'inputs': [
107 '<(PRODUCT_DIR)/tls_edit',
108 '<(PRODUCT_DIR)/irt_core_raw_newlib_arm.nexe',
109 ],
110 'outputs': [
111 '<(PRODUCT_DIR)/irt_core_newlib_arm.nexe',
112 ],
113 'action': ['<@(_inputs)', '<@(_outputs)'],
114 },
115 ],
116 }],
117 ['target_arch!="arm"', {
118 'actions': [
119 {
120 'action_name': 'tls_edit_irt_x64',
121 'message': 'Patching TLS for irt_core (x86-64)',
122 'msvs_cygwin_shell': 0,
123 'inputs': [
124 '<(PRODUCT_DIR)/tls_edit',
125 '<(PRODUCT_DIR)/irt_core_raw_newlib_x64.nexe',
126 ],
127 'outputs': [
128 '<(PRODUCT_DIR)/irt_core_newlib_x64.nexe',
129 ],
130 'action': ['<@(_inputs)', '<@(_outputs)'],
131 },
132 {
133 'action_name': 'tls_edit_irt_x32',
134 'message': 'Patching TLS for irt_core (x86-32)',
135 'msvs_cygwin_shell': 0,
136 'inputs': [
137 '<(PRODUCT_DIR)/tls_edit',
138 '<(PRODUCT_DIR)/irt_core_raw_newlib_x32.nexe',
139 ],
140 'outputs': [
141 '<(PRODUCT_DIR)/irt_core_newlib_x32.nexe',
142 ],
143 'action': ['<@(_inputs)', '<@(_outputs)'],
144 },
145 ],
146 }],
147 ],
148 },
149 {
89 'target_name': 'irt_browser_lib', 150 'target_name': 'irt_browser_lib',
90 'type': 'none', 151 'type': 'none',
91 'variables': { 152 'variables': {
92 'nlib_target': 'libirt_browser.a', 153 'nlib_target': 'libirt_browser.a',
93 'build_glibc': 0, 154 'build_glibc': 0,
94 'build_newlib': 1, 155 'build_newlib': 1,
95 'build_irt': 1, 156 'build_irt': 1,
96 }, 157 },
97 'sources': ['<@(irt_sources)', '<@(irt_browser)'], 158 'sources': ['<@(irt_sources)', '<@(irt_browser)'],
98 'include_dirs': ['../../../../ppapi'], 159 'include_dirs': ['../../../../ppapi'],
99 'conditions': [ 160 'conditions': [
100 ['target_arch=="arm"', { 161 ['target_arch=="arm"', {
101 'sources': [ 'aeabi_read_tp.S' ], 162 'sources': [ 'aeabi_read_tp.S' ],
102 }], 163 }],
103 ], 164 ],
104 'dependencies': [ 165 'dependencies': [
105 '<(DEPTH)/native_client/tools.gyp:prep_toolchain', 166 '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
106 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib', 167 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib_newlib',
107 ], 168 ],
108 }, 169 },
109 ], 170 ],
110 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698