diff options
-rw-r--r-- | build/all.gyp | 4 | ||||
-rw-r--r-- | build/config/BUILDCONFIG.gn | 3 | ||||
-rwxr-xr-x | build/gyp_chromium | 26 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_browser_chromeos.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_browser_extensions.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_browser_ui.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_common.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_renderer.gypi | 2 | ||||
-rw-r--r-- | chrome/tools/profile_reset/jtl_compiler.gyp | 2 | ||||
-rw-r--r-- | components/plugins.gypi | 2 | ||||
-rw-r--r-- | components/url_matcher.gypi | 2 | ||||
-rw-r--r-- | content/content_browser.gypi | 2 | ||||
-rw-r--r-- | extensions/extensions.gyp | 2 | ||||
-rw-r--r-- | gpu/command_buffer_service.gypi | 2 | ||||
-rw-r--r-- | gpu/gpu_config.gypi | 2 | ||||
-rw-r--r-- | third_party/leveldatabase/leveldatabase.gyp | 2 | ||||
-rw-r--r-- | third_party/libaddressinput/libaddressinput.gyp | 2 | ||||
-rw-r--r-- | third_party/re2/BUILD.gn | 2 |
19 files changed, 46 insertions, 19 deletions
diff --git a/build/all.gyp b/build/all.gyp index df27a9b..989ebf6 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -35,6 +35,7 @@ 'conditions': [ ['OS!="ios"', { 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../cc/cc_tests.gyp:*', '../device/bluetooth/bluetooth.gyp:*', '../device/device_tests.gyp:*', @@ -47,11 +48,11 @@ '../media/cast/cast.gyp:*', '../media/media.gyp:*', '../mojo/mojo.gyp:*', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../ppapi/ppapi.gyp:*', '../ppapi/ppapi_internal.gyp:*', '../printing/printing.gyp:*', '../skia/skia.gyp:*', + '../third_party/WebKit/public/all.gyp:*', '../third_party/cacheinvalidation/cacheinvalidation.gyp:*', '../third_party/codesighs/codesighs.gyp:*', '../third_party/ffmpeg/ffmpeg.gyp:*', @@ -66,7 +67,6 @@ '../third_party/npapi/npapi.gyp:*', '../third_party/ots/ots.gyp:*', '../third_party/qcms/qcms.gyp:*', - '../third_party/WebKit/public/all.gyp:*', '../tools/gn/gn.gyp:*', '../tools/perf/clear_system_cache/clear_system_cache.gyp:*', '../v8/tools/gyp/v8.gyp:*', diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 9239c24..c4a57b0 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -77,6 +77,9 @@ declare_args() { # Compile for Thread Sanitizer to find threading bugs. is_tsan = false + + # When running in gyp-generating mode, this is the root of the build tree. + gyp_output_dir = "out" } # ============================================================================= diff --git a/build/gyp_chromium b/build/gyp_chromium index 8e841d4..fd162ea 100755 --- a/build/gyp_chromium +++ b/build/gyp_chromium @@ -127,6 +127,23 @@ def GetGypVarsForGN(supplemental_files): return dict(supp_items + env_items + cmdline_items) +def GetOutputDirectory(): + """Returns the output directory that GYP will use.""" + # GYP generator flags from the command line. We can't use optparse since we + # want to ignore all arguments other than "-G". + needle = '-Goutput_dir=' + cmdline_input_items = [] + for item in sys.argv[1:]: + if item.startswith(needle): + return item[len(needle):] + + env_items = shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', '')) + needle = 'output_dir=' + for item in env_items: + if item.startswith(needle): + return item[len(needle):] + + return "out" def GetArgsStringForGN(supplemental_files): """Returns the args to pass to GN. @@ -226,6 +243,10 @@ def GetArgsStringForGN(supplemental_files): # Set the GYP flag so BUILD files know they're being invoked in GYP mode. gn_args += ' is_gyp=true' + + gyp_outdir = GetOutputDirectory() + gn_args += ' gyp_output_dir=\"%s\"' % gyp_outdir + return gn_args.strip() @@ -286,7 +307,8 @@ def RunGN(supplemental_includes): # to know they're being run under GYP. args = [gnpath, 'gyp', '-q', '--root=' + chrome_src, - '--args=' + GetArgsStringForGN(supplemental_includes)] + '--args=' + GetArgsStringForGN(supplemental_includes), + '--output=//' + GetOutputDirectory() + '/gn_build/'] return subprocess.call(args) == 0 @@ -401,6 +423,8 @@ if __name__ == '__main__': args.extend( ['-I' + i for i in additional_include_files(supplemental_includes, args)]) + args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()]) + print 'Updating projects from gyp files...' sys.stdout.flush() diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index b7551ac..8bee78d 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2616,6 +2616,7 @@ 'installer_util', 'sync_file_system_drive_proto', 'sync_file_system_proto', + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../cc/cc.gyp:cc', '../components/components.gyp:autofill_content_browser', '../components/components.gyp:browser_context_keyed_service', @@ -2638,7 +2639,6 @@ '../third_party/libusb/libusb.gyp:libusb', '../third_party/libyuv/libyuv.gyp:libyuv', '../third_party/npapi/npapi.gyp:npapi', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../third_party/webrtc/modules/modules.gyp:desktop_capture', '../ui/gl/gl.gyp:gl', '../ui/surface/surface.gyp:surface', diff --git a/chrome/chrome_browser_chromeos.gypi b/chrome/chrome_browser_chromeos.gypi index bb5f934d..7ed2e9e 100644 --- a/chrome/chrome_browser_chromeos.gypi +++ b/chrome/chrome_browser_chromeos.gypi @@ -42,6 +42,7 @@ 'installer_util', 'safe_browsing_proto', 'safe_browsing_report_proto', + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../breakpad/breakpad.gyp:breakpad_client', '../build/linux/system.gyp:dbus', '../chromeos/chromeos.gyp:chromeos', @@ -82,7 +83,6 @@ '../third_party/npapi/npapi.gyp:npapi', '../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/protobuf/protobuf.gyp:protoc#host', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../third_party/zlib/zlib.gyp:zlib', '../ui/base/strings/ui_strings.gyp:ui_strings', '../ui/events/events.gyp:dom4_keycode_converter', diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi index 23c61ce..09ad962 100644 --- a/chrome/chrome_browser_extensions.gypi +++ b/chrome/chrome_browser_extensions.gypi @@ -28,6 +28,7 @@ 'installer_util', 'safe_browsing_proto', 'sync_file_system_proto', + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../components/component_strings.gyp:component_strings', '../components/components.gyp:onc_component', '../components/components.gyp:url_matcher', @@ -44,7 +45,6 @@ '../third_party/icu/icu.gyp:icuuc', '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/libusb/libusb.gyp:libusb', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../third_party/webrtc/modules/modules.gyp:desktop_capture', '../ui/base/strings/ui_strings.gyp:ui_strings', '../ui/gfx/gfx.gyp:gfx', diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index ec3e625..ea6f13c 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -2621,6 +2621,7 @@ 'common/extensions/api/api.gyp:api', 'debugger', 'installer_util', + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../components/components.gyp:autofill_content_risk_proto', '../device/bluetooth/bluetooth.gyp:device_bluetooth', '../media/media.gyp:media', @@ -2631,7 +2632,6 @@ '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/npapi/npapi.gyp:npapi', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../ui/compositor/compositor.gyp:compositor', '../ui/surface/surface.gyp:surface', '../ui/web_dialogs/web_dialogs.gyp:web_dialogs', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index f915ee1..80a4bdd 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -414,6 +414,7 @@ }], ['OS != "ios"', { 'dependencies': [ + '<(DEPTH)/<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '<(DEPTH)/chrome/common/extensions/api/api.gyp:api', '<(DEPTH)/components/components.gyp:autofill_core_common', '<(DEPTH)/components/components.gyp:autofill_content_common', @@ -422,7 +423,6 @@ '<(DEPTH)/extensions/extensions.gyp:extensions_common', '<(DEPTH)/ipc/ipc.gyp:ipc', '<(DEPTH)/third_party/adobe/flash/flash_player.gyp:flapper_version_h', - '<(DEPTH)/out/gn_gyp/third_party/re2/re2.gyp:re2', '<(DEPTH)/third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', ], }, { # OS == ios diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 12eaa17..8325c3a 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -13,6 +13,7 @@ 'common_net', 'chrome_resources.gyp:chrome_resources', 'chrome_resources.gyp:chrome_strings', + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../components/components.gyp:autofill_content_renderer', '../components/components.gyp:startup_metric_utils', '../components/components.gyp:plugins_renderer', @@ -29,7 +30,6 @@ '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', '../third_party/npapi/npapi.gyp:npapi', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '../ui/surface/surface.gyp:surface', '../webkit/child/webkit_child.gyp:webkit_child', diff --git a/chrome/tools/profile_reset/jtl_compiler.gyp b/chrome/tools/profile_reset/jtl_compiler.gyp index cd445c5..f78c25e 100644 --- a/chrome/tools/profile_reset/jtl_compiler.gyp +++ b/chrome/tools/profile_reset/jtl_compiler.gyp @@ -22,8 +22,8 @@ 'type': 'static_library', 'product_name': 'jtl_compiler', 'dependencies': [ + '../../../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../../../base/base.gyp:base', - '../../../out/gn_gyp/third_party/re2/re2.gyp:re2', ], 'sources': [ '../../browser/profile_resetter/jtl_foundation.h', diff --git a/components/plugins.gypi b/components/plugins.gypi index 8679f06..7ccd46f 100644 --- a/components/plugins.gypi +++ b/components/plugins.gypi @@ -11,9 +11,9 @@ 'target_name': 'plugins_renderer', 'type': 'static_library', 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../gin/gin.gyp:gin', '../skia/skia.gyp:skia', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../third_party/WebKit/public/blink.gyp:blink', '../v8/tools/gyp/v8.gyp:v8', ], diff --git a/components/url_matcher.gypi b/components/url_matcher.gypi index da057de..348795a 100644 --- a/components/url_matcher.gypi +++ b/components/url_matcher.gypi @@ -8,9 +8,9 @@ 'target_name': 'url_matcher', 'type': '<(component)', 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../url/url.gyp:url_lib', ], 'include_dirs': [ diff --git a/content/content_browser.gypi b/content/content_browser.gypi index 4297852..8ee4996 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -4,11 +4,11 @@ { 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../base/base.gyp:base_static', '../crypto/crypto.gyp:crypto', '../google_apis/google_apis.gyp:google_apis', '../net/net.gyp:net', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../skia/skia.gyp:skia', '../sql/sql.gyp:sql', '../third_party/zlib/google/zip.gyp:zip', diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp index 1b4b049..a1c7020 100644 --- a/extensions/extensions.gyp +++ b/extensions/extensions.gyp @@ -11,6 +11,7 @@ 'target_name': 'extensions_common', 'type': 'static_library', 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', # TODO(benwells): figure out what to do with the api target and # api resources compiled into the chrome resource bundle. # http://crbug.com/162530 @@ -20,7 +21,6 @@ '../chrome/common/extensions/api/api.gyp:api', '../components/components.gyp:url_matcher', '../content/content.gyp:content_common', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', ], 'include_dirs': [ '..', diff --git a/gpu/command_buffer_service.gypi b/gpu/command_buffer_service.gypi index 60f8fb0..4d4b74e 100644 --- a/gpu/command_buffer_service.gypi +++ b/gpu/command_buffer_service.gypi @@ -12,6 +12,7 @@ ], }, 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../crypto/crypto.gyp:crypto', @@ -23,7 +24,6 @@ '../third_party/khronos/khronos.gyp:khronos_headers', '../third_party/protobuf/protobuf.gyp:protobuf_lite', '../third_party/smhasher/smhasher.gyp:cityhash', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', ], 'sources': [ 'command_buffer/service/async_pixel_transfer_delegate.cc', diff --git a/gpu/gpu_config.gypi b/gpu/gpu_config.gypi index 8d35a96..c44da74 100644 --- a/gpu/gpu_config.gypi +++ b/gpu/gpu_config.gypi @@ -4,8 +4,8 @@ { 'dependencies': [ + '../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../base/base.gyp:base', - '../out/gn_gyp/third_party/re2/re2.gyp:re2', '../ui/gl/gl.gyp:gl', ], 'include_dirs': [ diff --git a/third_party/leveldatabase/leveldatabase.gyp b/third_party/leveldatabase/leveldatabase.gyp index f3510f6..138e300 100644 --- a/third_party/leveldatabase/leveldatabase.gyp +++ b/third_party/leveldatabase/leveldatabase.gyp @@ -37,11 +37,11 @@ 'target_name': 'leveldatabase', 'type': 'static_library', 'dependencies': [ + '../../<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '../../base/base.gyp:base', # base::LazyInstance is a template that pulls in dynamic_annotations so # we need to explictly link in the code for dynamic_annotations. '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '../../out/gn_gyp/third_party/re2/re2.gyp:re2', ], 'conditions': [ ['use_snappy', { diff --git a/third_party/libaddressinput/libaddressinput.gyp b/third_party/libaddressinput/libaddressinput.gyp index 3df2a0d..f3f84da 100644 --- a/third_party/libaddressinput/libaddressinput.gyp +++ b/third_party/libaddressinput/libaddressinput.gyp @@ -99,8 +99,8 @@ ], 'dependencies': [ 'libaddressinput_strings', + '<(DEPTH)/<(gyp_output_dir)/gn_gyp/third_party/re2/re2.gyp:re2', '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/out/gn_gyp/third_party/re2/re2.gyp:re2', ], 'direct_dependent_settings': { 'include_dirs': [ diff --git a/third_party/re2/BUILD.gn b/third_party/re2/BUILD.gn index e77aad2..9f3ba8d 100644 --- a/third_party/re2/BUILD.gn +++ b/third_party/re2/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -gyp_file = "//out/gn_gyp/third_party/re2/re2.gyp" +gyp_file = "//$gyp_output_dir/gn_gyp/third_party/re2/re2.gyp" config("re2_config") { include_dirs = [ "." ] |