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

Side by Side Diff: build/toolchain/mac/BUILD.gn

Issue 1961473003: [Mac/GN] Set up the component build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment and rebase Created 4 years, 7 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 | « build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn ('k') | chrome/BUILD.gn » ('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 (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 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires 5 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires
6 # some enhancements since the commands on Mac are slightly different than on 6 # some enhancements since the commands on Mac are slightly different than on
7 # Linux. 7 # Linux.
8 8
9 import("../goma.gni") 9 import("../goma.gni")
10 import("//build/config/ios/ios_sdk.gni") 10 import("//build/config/ios/ios_sdk.gni")
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 # the existing .TOC file, overwrite it, otherwise, don't change it. 131 # the existing .TOC file, overwrite it, otherwise, don't change it.
132 # 132 #
133 # As a special case, if the library reexports symbols from other dynamic 133 # As a special case, if the library reexports symbols from other dynamic
134 # libraries, we always update the .TOC and skip the temporary file and 134 # libraries, we always update the .TOC and skip the temporary file and
135 # diffing steps, since that library always needs to be re-linked. 135 # diffing steps, since that library always needs to be re-linked.
136 tocname = dylib + ".TOC" 136 tocname = dylib + ".TOC"
137 temporary_tocname = dylib + ".tmp" 137 temporary_tocname = dylib + ".tmp"
138 138
139 does_reexport_command = "[ ! -e \"$dylib\" -o ! -e \"$tocname\" ] || otool -l \"$dylib\" | grep -q LC_REEXPORT_DYLIB" 139 does_reexport_command = "[ ! -e \"$dylib\" -o ! -e \"$tocname\" ] || otool -l \"$dylib\" | grep -q LC_REEXPORT_DYLIB"
140 140
141 link_command = 141 link_command = "$ld -shared "
142 "$ld -shared {{ldflags}} -o \"$dylib\" -Wl,-filelist,\"$rspfile\""
143 if (is_component_build) { 142 if (is_component_build) {
144 link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{outpu t_extension}}" 143 link_command += " -Wl,-install_name,@rpath/\"{{target_output_name}}{{out put_extension}}\" "
145 } 144 }
146 link_command += " {{solibs}} {{libs}}" 145 link_command += "{{ldflags}} -o \"$dylib\" -Wl,-filelist,\"$rspfile\" {{li bs}} {{solibs}}"
147 146
148 replace_command = "if ! cmp -s \"$temporary_tocname\" \"$tocname\"; then m v \"$temporary_tocname\" \"$tocname\"" 147 replace_command = "if ! cmp -s \"$temporary_tocname\" \"$tocname\"; then m v \"$temporary_tocname\" \"$tocname\""
149 extract_toc_command = "{ otool -l \"$dylib\" | grep LC_ID_DYLIB -A 5; nm - gP \"$dylib\" | cut -f1-2 -d' ' | grep -v U\$\$; true; }" 148 extract_toc_command = "{ otool -l \"$dylib\" | grep LC_ID_DYLIB -A 5; nm - gP \"$dylib\" | cut -f1-2 -d' ' | grep -v U\$\$; true; }"
150 149
151 command = "if $does_reexport_command ; then $link_command && $extract_toc_ command > \"$tocname\"; else $link_command && $extract_toc_command > \"$temporar y_tocname\" && $replace_command ; fi; fi" 150 command = "if $does_reexport_command ; then $link_command && $extract_toc_ command > \"$tocname\"; else $link_command && $extract_toc_command > \"$temporar y_tocname\" && $replace_command ; fi; fi"
152 151
153 rspfile_content = "{{inputs_newline}}" 152 rspfile_content = "{{inputs_newline}}"
154 153
155 description = "SOLINK {{output}}" 154 description = "SOLINK {{output}}"
156 155
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 356 }
358 357
359 mac_toolchain("x64") { 358 mac_toolchain("x64") {
360 toolchain_cpu = "x64" 359 toolchain_cpu = "x64"
361 toolchain_os = "mac" 360 toolchain_os = "mac"
362 cc = "${goma_prefix}/gcc" 361 cc = "${goma_prefix}/gcc"
363 cxx = "${goma_prefix}/g++" 362 cxx = "${goma_prefix}/g++"
364 ld = cxx 363 ld = cxx
365 is_clang = false 364 is_clang = false
366 } 365 }
OLDNEW
« no previous file with comments | « build/secondary/third_party/crashpad/crashpad/handler/BUILD.gn ('k') | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698