diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 20:17:16 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 20:17:16 +0000 |
commit | 2ed04ae3a8f4b00808b2bd4a8c9e32befb4ecb84 (patch) | |
tree | 96b133744df9c2b16f50f91901d70b84e5bb2c75 /tools/gn/secondary | |
parent | 66ab87e8ebc518ab54238f9899f813311844997b (diff) | |
download | chromium_src-2ed04ae3a8f4b00808b2bd4a8c9e32befb4ecb84.zip chromium_src-2ed04ae3a8f4b00808b2bd4a8c9e32befb4ecb84.tar.gz chromium_src-2ed04ae3a8f4b00808b2bd4a8c9e32befb4ecb84.tar.bz2 |
Add inherited libs and lib_dirs to GN.
The libs and lib_dirs are pushed up the tree until they reach a shared library or executable. Additionally, I added prefixes in the toolchain to specify these.
This converts ldflags to be per-target rather than inherited which was previously used to implement this feature.
Rename includes to include_dirs for consistency with lib_dirs.
Remove the sill swap_in_* inline functions and just do foo().swap().
BUG=
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/26074002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/secondary')
27 files changed, 244 insertions, 93 deletions
diff --git a/tools/gn/secondary/base/BUILD.gn b/tools/gn/secondary/base/BUILD.gn index 9aeaf8c..93eebad 100644 --- a/tools/gn/secondary/base/BUILD.gn +++ b/tools/gn/secondary/base/BUILD.gn @@ -4,7 +4,7 @@ config("base_libs") { if (!is_win) { - ldflags = [ "-ldl" ] + libs = [ "dl" ] } } @@ -700,7 +700,6 @@ component("base") { # So we can append below without worrying about whether it has been # previously defined or not. all_dependent_configs = [ ":base_libs" ] - ldflags = [] if (!is_chromeos) { sources -= [ @@ -881,6 +880,13 @@ static_library("test_support_base") { "test/expectations/parser.h", "test/gtest_xml_util.cc", "test/gtest_xml_util.h", + "test/launcher/parallel_test_launcher.cc", + "test/launcher/parallel_test_launcher.h", + "test/launcher/test_launcher.cc", + "test/launcher/test_launcher.h", + "test/launcher/unit_test_launcher.cc", + "test/launcher/unit_test_launcher.h", + "test/launcher/unit_test_launcher_ios.cc", "test/mock_chrome_application_mac.h", "test/mock_chrome_application_mac.mm", "test/mock_devices_changed_observer.cc", @@ -892,8 +898,6 @@ static_library("test_support_base") { "test/multiprocess_test_android.cc", "test/null_task_runner.cc", "test/null_task_runner.h", - "test/parallel_test_launcher.cc", - "test/parallel_test_launcher.h", "test/perf_test_suite.cc", "test/perf_test_suite.h", "test/scoped_locale.cc", @@ -915,8 +919,6 @@ static_library("test_support_base") { "test/test_file_util_mac.cc", "test/test_file_util_posix.cc", "test/test_file_util_win.cc", - "test/test_launcher.cc", - "test/test_launcher.h", "test/test_listener_ios.h", "test/test_listener_ios.mm", "test/test_pending_task.cc", @@ -943,9 +945,6 @@ static_library("test_support_base") { "test/thread_test_helper.h", "test/trace_event_analyzer.cc", "test/trace_event_analyzer.h", - "test/unit_test_launcher.cc", - "test/unit_test_launcher.h", - "test/unit_test_launcher_ios.cc", "test/values_test_util.cc", "test/values_test_util.h", ] @@ -965,6 +964,9 @@ static_library("test_support_base") { ] } if (is_ios) { + # iOS uses its own unit test launcher. + sources -= "test/launcher/unit_test_launcher.cc" + # Pull in specific Mac files for iOS (which have been filtered out # by file name rules). set_sources_assignment_filter([]) diff --git a/tools/gn/secondary/build/config/compiler/BUILD.gn b/tools/gn/secondary/build/config/compiler/BUILD.gn index 0c5abf7..725af0a 100644 --- a/tools/gn/secondary/build/config/compiler/BUILD.gn +++ b/tools/gn/secondary/build/config/compiler/BUILD.gn @@ -4,7 +4,7 @@ # Base compiler configuration. config("compiler") { - includes = [ "//" ] + include_dirs = [ "//" ] if (is_win) { cflags = [ "/Gy", # Enable function-level linking. diff --git a/tools/gn/secondary/build/config/linux/BUILD.gn b/tools/gn/secondary/build/config/linux/BUILD.gn index 8d4b6f9..1a9507c 100644 --- a/tools/gn/secondary/build/config/linux/BUILD.gn +++ b/tools/gn/secondary/build/config/linux/BUILD.gn @@ -18,22 +18,24 @@ config("executable_ldconfig") { pkg_script = "pkg-config.py" config("fontconfig") { - ldflags = [ "-lfontconfig" ] + libs = [ "fontconfig" ] } config("freetype2") { pkgresult = exec_script(pkg_script, [ "freetype2" ], "value") - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] } config("glib") { pkgresult = exec_script(pkg_script, [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ], "value" ) - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] } config("gtk") { @@ -41,41 +43,44 @@ config("gtk") { # misconfigured systems. pkgresult = exec_script(pkg_script, [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ], "value" ) - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] defines = [ "TOOLKIT_GTK" ] } config("pangocairo") { pkgresult = exec_script(pkg_script, [ "pangocairo" ], "value" ) - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] } config("udev") { pkgresult = exec_script(pkg_script, [ "libudev" ], "value" ) - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] } config("x11") { # Don't bother running pkg-config for these X related libraries since it just # returns the same libs, and forking pkg-config is slow. defines = [ "USE_X11" ] - ldflags = [ - "-lX11", - "-lXcomposite", - "-lXcursor", - "-lXdamage", - "-lXext", - "-lXfixes", - "-lXi", - "-lXrender", - "-lXss", - "-lXtst", + libs = [ + "X11", + "Xcomposite", + "Xcursor", + "Xdamage", + "Xext", + "Xfixes", + "Xi", + "Xrender", + "Xss", + "Xtst", ] } diff --git a/tools/gn/secondary/build/config/linux/pkg-config.py b/tools/gn/secondary/build/config/linux/pkg-config.py index b2515d4..40988d9 100644 --- a/tools/gn/secondary/build/config/linux/pkg-config.py +++ b/tools/gn/secondary/build/config/linux/pkg-config.py @@ -11,8 +11,8 @@ from optparse import OptionParser # This script runs pkg-config, optionally filtering out some results, and # returns the result. # -# The result will be [ <includes>, <cflags>, <ldflags> ] where each member is -# itself a list of strings. +# The result will be [ <includes>, <cflags>, <libs>, <lib_dirs> ] where each +# member is itself a list of strings. # # You can filter out matches using "-v <regexp>" where all results from # pkgconfig matching the given regular expression will be ignored. You can @@ -49,6 +49,7 @@ except: includes = [] cflags = [] libs = [] +lib_dirs = [] def MatchesAnyRegexp(flag, list_of_regexps): for regexp in list_of_regexps: @@ -61,7 +62,9 @@ for flag in all_flags[:]: continue; if flag[:2] == '-l': - libs.append(flag) + libs.append(flag[2:]) + if flag[:2] == '-L': + lib_dirs.append(flag[2:]) elif flag[:2] == '-I': includes.append(flag[2:]) else: @@ -70,4 +73,4 @@ for flag in all_flags[:]: # Output a GN array, the first one is the cflags, the second are the libs. The # JSON formatter prints GN compatible lists when everything is a list of # strings. -print json.dumps([includes, cflags, libs]) +print json.dumps([includes, cflags, libs, lib_dirs]) diff --git a/tools/gn/secondary/build/config/win/BUILD.gn b/tools/gn/secondary/build/config/win/BUILD.gn index 081b21a..dee1be6 100644 --- a/tools/gn/secondary/build/config/win/BUILD.gn +++ b/tools/gn/secondary/build/config/win/BUILD.gn @@ -7,7 +7,7 @@ win_sdk_dir = "C:\Program Files (x86)\Windows Kits\8.0" # Compiler setup for the Windows SDK. Applied to all targets. config("sdk") { # The include path is the stuff returned by the script. - #includes = msvc_config[0] TODO(brettw) make this work. + #include_dirs = msvc_config[0] TODO(brettw) make this work. defines = [ "_ATL_NO_OPENGL", @@ -23,7 +23,7 @@ config("sdk") { "WINVER=0x0602", ] - includes = [ + include_dirs = [ "$win_sdk_dir\Include\shared", "$win_sdk_dir\Include\um", "$win_sdk_dir\Include\winrt", @@ -36,16 +36,14 @@ config("sdk_link") { is_64bit = false if (is_64bit) { - ldflags = [ - "/MACHINE:X64", - "/LIBPATH:\"$win_sdk_dir\Lib\win8\um\x64\"", - ] + ldflags = [ "/MACHINE:X64" ] + libs = [ "$win_sdk_dir\Lib\win8\um\x64" ] } else { ldflags = [ "/MACHINE:X86", - "/LIBPATH:\"$win_sdk_dir\Lib\win8\um\x86\"", - "/safeseh", # Not compatible with x64. + "/SAFESEH", # Not compatible with x64 so use only for x86. ] + lib_dirs = [ "$win_sdk_dir\Lib\win8\um\x86" ] #if (!is_asan) { TODO(brettw) Address Sanitizer # ldflags += "/largeaddressaware" @@ -77,7 +75,7 @@ config("common_linker_setup") { } # Common libraries. - ldflags += [ + libs = [ "advapi32.lib", "comdlg32.lib", "dbghelp.lib", diff --git a/tools/gn/secondary/build/toolchain/linux/BUILD.gn b/tools/gn/secondary/build/toolchain/linux/BUILD.gn index b3aed22..2332352 100644 --- a/tools/gn/secondary/build/toolchain/linux/BUILD.gn +++ b/tools/gn/secondary/build/toolchain/linux/BUILD.gn @@ -7,6 +7,10 @@ cxx = "g++" ld = cxx toolchain("gcc") { + # Make these apply to all tools below. + lib_prefix = "-l" + lib_dir_prefix="-L" + tool("cc") { # cflags_pch_c command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c \$in -o \$out" diff --git a/tools/gn/secondary/build/toolchain/mac/BUILD.gn b/tools/gn/secondary/build/toolchain/mac/BUILD.gn index 9a0fe44..2752d5a 100644 --- a/tools/gn/secondary/build/toolchain/mac/BUILD.gn +++ b/tools/gn/secondary/build/toolchain/mac/BUILD.gn @@ -7,6 +7,10 @@ cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", r ld = cxx toolchain("clang") { + # Make these apply to all tools below. + lib_prefix = "-l" + lib_dir_prefix="-L" + tool("cc") { command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$cflags_pch_c -c \$in -o \$out" description = "CC \$out" diff --git a/tools/gn/secondary/build/toolchain/win/BUILD.gn b/tools/gn/secondary/build/toolchain/win/BUILD.gn index 6a6d7ca..5887b92 100644 --- a/tools/gn/secondary/build/toolchain/win/BUILD.gn +++ b/tools/gn/secondary/build/toolchain/win/BUILD.gn @@ -21,6 +21,10 @@ msvc_config = [["foo"]] # 32-bit toolchain ------------------------------------------------------------- toolchain("32") { + # Make these apply to all tools below. + lib_prefix = "" + lib_dir_prefix="/LIBPATH:" + tool("cc") { command = "ninja -t msvc -e \$arch -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname" description = "CC \$out" diff --git a/tools/gn/secondary/chrome/BUILD.gn b/tools/gn/secondary/chrome/BUILD.gn index d2e6795..133bf82 100644 --- a/tools/gn/secondary/chrome/BUILD.gn +++ b/tools/gn/secondary/chrome/BUILD.gn @@ -66,9 +66,9 @@ static_library("browser") { external = true if (is_linux) { - ldflags = [ "-ldl" ] + libs = [ "dl" ] if (toolkit_uses_gtk) { - ldflags += "-lgconf-2" + libs += "gconf-2" } } if (is_linux) { diff --git a/tools/gn/secondary/crypto/ssl/BUILD.gn b/tools/gn/secondary/crypto/ssl/BUILD.gn index 249ecc1..461176d 100644 --- a/tools/gn/secondary/crypto/ssl/BUILD.gn +++ b/tools/gn/secondary/crypto/ssl/BUILD.gn @@ -18,9 +18,10 @@ if (is_linux && use_system_ssl) { config("system_ssl_config") { defines = [ "USE_SYSTEM_SSL" ] pkgresult = exec_script(pkg_script, [ "nss" ], "value") - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] } } diff --git a/tools/gn/secondary/net/third_party/nss/BUILD.gn b/tools/gn/secondary/net/third_party/nss/BUILD.gn index 17a9bd1..ba5ecc2 100644 --- a/tools/gn/secondary/net/third_party/nss/BUILD.gn +++ b/tools/gn/secondary/net/third_party/nss/BUILD.gn @@ -2,8 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -config("crssl_config") { - includes = [ +config("ssl_config") { + include_dirs = [ "//net/third_party/nss/ssl", ] } @@ -70,7 +70,7 @@ component("ssl") { configs -= "//build/config/compiler:chromium_code" configs += "//build/config/compiler:no_chromium_code" - direct_dependent_configs = [ ":crssl_config" ] + direct_dependent_configs = [ ":ssl_config" ] if (is_win) { sources -= [ @@ -85,7 +85,7 @@ component("ssl") { } if (is_linux) { - includes = [ "bodge" ] + include_dirs = [ "bodge" ] configs += "//third_party/nss:nss_linux_config" } if (is_mac) { diff --git a/tools/gn/secondary/sdch/BUILD.gn b/tools/gn/secondary/sdch/BUILD.gn index ea36d0a..c8f20c7 100644 --- a/tools/gn/secondary/sdch/BUILD.gn +++ b/tools/gn/secondary/sdch/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. config("sdch_config") { - includes = [ "open-vcdiff/src" ] + include_dirs = [ "open-vcdiff/src" ] } static_library("sdch") { @@ -43,13 +43,13 @@ static_library("sdch") { direct_dependent_configs = [ ":sdch_config" ] if (is_linux || is_android) { - includes = [ "linux" ] + include_dirs = [ "linux" ] } else if (is_ios) { - includes = [ "ios" ] + include_dirs = [ "ios" ] } else if (is_mac) { - includes = [ "mac" ] + include_dirs = [ "mac" ] } else if (is_win) { - includes = [ "win" ] + include_dirs = [ "win" ] } deps = [ "//third_party/zlib" ] diff --git a/tools/gn/secondary/skia/BUILD.gn b/tools/gn/secondary/skia/BUILD.gn index 2f04bd9..0ce32ad 100644 --- a/tools/gn/secondary/skia/BUILD.gn +++ b/tools/gn/secondary/skia/BUILD.gn @@ -8,7 +8,7 @@ skia_support_pdf = !is_ios && enable_printing # External-facing config for dependent code. config("skia_config") { - includes = [ + include_dirs = [ "config", "//third_party/skia/include/config", "//third_party/skia/include/core", @@ -34,7 +34,7 @@ config("skia_config") { ] if (skia_support_gpu) { - includes += [ + include_dirs += [ "//third_party/skia/include/gpu", "//third_party/skia/src/gpu", ] @@ -190,7 +190,7 @@ config("skia_library_config") { } if (is_win) { - includes = [ + include_dirs = [ "//third_party/skia/include/utils/win", "//third_party/skia/src/utils/win", ] @@ -1182,7 +1182,7 @@ if (component_mode == "static_library") { } config("skia_chrome_config") { - includes = [ "ext" ] + include_dirs = [ "ext" ] } static_library("skia_chrome") { @@ -1338,7 +1338,7 @@ static_library("skia_opts_ssse3") { ] if (is_linux) { - cflags = "-msse3" + cflags = [ "-msse3" ] } else if (is_mac) { assert(false, "TODO(brettw) write this") # 'xcode_settings': { diff --git a/tools/gn/secondary/testing/BUILD.gn b/tools/gn/secondary/testing/BUILD.gn index 8b2849f..08f3c4d 100644 --- a/tools/gn/secondary/testing/BUILD.gn +++ b/tools/gn/secondary/testing/BUILD.gn @@ -5,7 +5,7 @@ # TODO(brettw) move to testing/gtest/BUILD.gn config("gtest_config") { defines = [ "UNIT_TEST" ] - includes = [ "gtest/include" ] # Gtest headers need to be able to find themselves. + include_dirs = [ "gtest/include" ] # Gtest headers need to be able to find themselves. if (is_win) { cflags = [ "/wd4800" ] # Unused variable warning. } @@ -48,14 +48,14 @@ static_library("gtest") { "platform_test.h", ] - includes = [ "gtest" ] + include_dirs = [ "gtest" ] direct_dependent_configs = [ ":gtest_config" ] } # TODO(brettw) move to testing/gmock/BUILD.gn config("gmock_config") { # Gmock headers need to be able to find themselves. - includes = [ "gmock/include" ] + include_dirs = [ "gmock/include" ] } # TODO(brettw) move to testing/gmock/BUILD.gn @@ -85,7 +85,7 @@ static_library("gmock") { ] # This project includes some stuff form gtest's guts. - includes = [ "gtest/include" ] + include_dirs = [ "gtest/include" ] direct_dependent_configs = [ ":gmock_config", diff --git a/tools/gn/secondary/third_party/expat/BUILD.gn b/tools/gn/secondary/third_party/expat/BUILD.gn index 1ff7b14..b0ba187 100644 --- a/tools/gn/secondary/third_party/expat/BUILD.gn +++ b/tools/gn/secondary/third_party/expat/BUILD.gn @@ -4,7 +4,7 @@ if (is_linux) { config("expat_config") { - ldflags = [ "-lexpat" ] + libs = [ "expat" ] } group("expat") { @@ -15,7 +15,7 @@ if (is_linux) { # <android_src>/external/expat/lib } else { config("expat_config") { - includes = [ "files/lib" ] + include_dirs = [ "files/lib" ] defines = [ "XML_STATIC" ] } diff --git a/tools/gn/secondary/third_party/icu/BUILD.gn b/tools/gn/secondary/third_party/icu/BUILD.gn index 1a55536..2a9f3a6 100644 --- a/tools/gn/secondary/third_party/icu/BUILD.gn +++ b/tools/gn/secondary/third_party/icu/BUILD.gn @@ -7,7 +7,7 @@ config("icu_config") { defines = [ "U_USING_ICU_NAMESPACE=0", ] - includes = [ + include_dirs = [ "source/common", "source/i18n", ] diff --git a/tools/gn/secondary/third_party/leveldatabase/BUILD.gn b/tools/gn/secondary/third_party/leveldatabase/BUILD.gn index dfab34b..454c7ef 100644 --- a/tools/gn/secondary/third_party/leveldatabase/BUILD.gn +++ b/tools/gn/secondary/third_party/leveldatabase/BUILD.gn @@ -9,13 +9,13 @@ use_snappy = true defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ] config("leveldatabase_config") { - includes = [ + include_dirs = [ ".", "src", "src/include", ] if (is_win) { - includes += "src/port/win" + include_dirs += "src/port/win" } } diff --git a/tools/gn/secondary/third_party/libevent/BUILD.gn b/tools/gn/secondary/third_party/libevent/BUILD.gn index ea7cb27..a990a3b 100644 --- a/tools/gn/secondary/third_party/libevent/BUILD.gn +++ b/tools/gn/secondary/third_party/libevent/BUILD.gn @@ -26,15 +26,15 @@ static_library("libevent") { defines = [ "HAVE_CONFIG_H" ] if (is_linux) { - ldflags = [ "-lrt" ] + libs = [ "rt" ] } else { sources -= [ "epoll.c", "epoll_sub.c" ] } if (is_mac) { - includes = [ "mac" ] + include_dirs = [ "mac" ] } else if (is_linux) { - includes = [ "linux" ] + include_dirs = [ "linux" ] sources -= [ "kqueue.c" ] } diff --git a/tools/gn/secondary/third_party/libusb/BUILD.gn b/tools/gn/secondary/third_party/libusb/BUILD.gn index 2517df8..cf159ea 100644 --- a/tools/gn/secondary/third_party/libusb/BUILD.gn +++ b/tools/gn/secondary/third_party/libusb/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. config("libusb_config") { - includes = [ + include_dirs = [ "src/libusb", ] } @@ -44,7 +44,7 @@ static_library("libusb") { "src/msvc/inttypes.h", "src/msvc/stdint.h", ] - includes = [ + include_dirs = [ "src/libusb/os", ] @@ -91,9 +91,9 @@ static_library("libusb") { } if (is_win) { - includes += "src/msvc" + include_dirs += "src/msvc" } else { - includes += "src" + include_dirs += "src" sources -= [ "src/libusb/os/poll_windows.c", "src/libusb/os/poll_windows.h", diff --git a/tools/gn/secondary/third_party/libxml/BUILD.gn b/tools/gn/secondary/third_party/libxml/BUILD.gn index c1cef56..f7e142d 100644 --- a/tools/gn/secondary/third_party/libxml/BUILD.gn +++ b/tools/gn/secondary/third_party/libxml/BUILD.gn @@ -18,7 +18,7 @@ config("libxml_config") { # GCC. ("defines" does "-DFOO" which defines the macro FOO as 1.) cflags = [ "-DLIBXML_STATIC=" ] - includes = [ + include_dirs = [ "src/include", "$os_include/include", ] @@ -157,7 +157,7 @@ static_library("libxml") { ] } else if (is_linux) { # We need dl for dlopen() and friends. - ldflags = [ "-ldl" ] + libs = [ "dl" ] } else if (is_mac || is_android) { # http://www.xmlsoft.org/threads.html says that this is required when using # libxml from several threads, which can possibly happen in chrome. On @@ -181,7 +181,7 @@ static_library("libxml") { ] } - includes = [ + include_dirs = [ "$os_include", ] } diff --git a/tools/gn/secondary/third_party/nss/BUILD.gn b/tools/gn/secondary/third_party/nss/BUILD.gn index 03b288e..aad45fc 100644 --- a/tools/gn/secondary/third_party/nss/BUILD.gn +++ b/tools/gn/secondary/third_party/nss/BUILD.gn @@ -8,8 +8,9 @@ if (is_linux) { config("nss_linux_config") { pkgresult = exec_script(pkg_script, [ "nss" ], "value") - includes = pkgresult[0] + include_dirs = pkgresult[0] cflags = pkgresult[1] - ldflags = pkgresult[2] + libs = pkgresult[2] + lib_dirs = pkgresult[3] } } diff --git a/tools/gn/secondary/third_party/re2/BUILD.gn b/tools/gn/secondary/third_party/re2/BUILD.gn index 1a29f84..3e275c2 100644 --- a/tools/gn/secondary/third_party/re2/BUILD.gn +++ b/tools/gn/secondary/third_party/re2/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. config("re2_config") { - includes = [ "." ] + include_dirs = [ "." ] } static_library("re2") { @@ -66,7 +66,7 @@ static_library("re2") { ] if (is_win) { - includes = [ "mswin" ] + include_dirs = [ "mswin" ] # TODO(brettw) 'msvs_disabled_warnings': [ 4018, 4722, 4267 ], } else { sources -= "mswin/stdint.h" diff --git a/tools/gn/secondary/third_party/sfntly/BUILD.gn b/tools/gn/secondary/third_party/sfntly/BUILD.gn new file mode 100644 index 0000000..2f8f847 --- /dev/null +++ b/tools/gn/secondary/third_party/sfntly/BUILD.gn @@ -0,0 +1,129 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +static_library("sfntly") { + sources = [ + "cpp/src/sfntly/data/byte_array.cc", + "cpp/src/sfntly/data/byte_array.h", + "cpp/src/sfntly/data/font_data.cc", + "cpp/src/sfntly/data/font_data.h", + "cpp/src/sfntly/data/font_input_stream.cc", + "cpp/src/sfntly/data/font_input_stream.h", + "cpp/src/sfntly/data/font_output_stream.cc", + "cpp/src/sfntly/data/font_output_stream.h", + "cpp/src/sfntly/data/growable_memory_byte_array.cc", + "cpp/src/sfntly/data/growable_memory_byte_array.h", + "cpp/src/sfntly/data/memory_byte_array.cc", + "cpp/src/sfntly/data/memory_byte_array.h", + "cpp/src/sfntly/data/readable_font_data.cc", + "cpp/src/sfntly/data/readable_font_data.h", + "cpp/src/sfntly/data/writable_font_data.cc", + "cpp/src/sfntly/data/writable_font_data.h", + "cpp/src/sfntly/font.cc", + "cpp/src/sfntly/font.h", + "cpp/src/sfntly/font_factory.cc", + "cpp/src/sfntly/font_factory.h", + "cpp/src/sfntly/math/fixed1616.h", + "cpp/src/sfntly/math/font_math.h", + "cpp/src/sfntly/port/atomic.h", + "cpp/src/sfntly/port/config.h", + "cpp/src/sfntly/port/endian.h", + "cpp/src/sfntly/port/exception_type.h", + "cpp/src/sfntly/port/file_input_stream.cc", + "cpp/src/sfntly/port/file_input_stream.h", + "cpp/src/sfntly/port/input_stream.h", + "cpp/src/sfntly/port/lock.cc", + "cpp/src/sfntly/port/lock.h", + "cpp/src/sfntly/port/memory_input_stream.cc", + "cpp/src/sfntly/port/memory_input_stream.h", + "cpp/src/sfntly/port/memory_output_stream.cc", + "cpp/src/sfntly/port/memory_output_stream.h", + "cpp/src/sfntly/port/output_stream.h", + "cpp/src/sfntly/port/refcount.h", + "cpp/src/sfntly/port/type.h", + "cpp/src/sfntly/table/bitmap/big_glyph_metrics.cc", + "cpp/src/sfntly/table/bitmap/big_glyph_metrics.h", + "cpp/src/sfntly/table/bitmap/bitmap_glyph.cc", + "cpp/src/sfntly/table/bitmap/bitmap_glyph.h", + "cpp/src/sfntly/table/bitmap/bitmap_glyph_info.cc", + "cpp/src/sfntly/table/bitmap/bitmap_glyph_info.h", + "cpp/src/sfntly/table/bitmap/bitmap_size_table.cc", + "cpp/src/sfntly/table/bitmap/bitmap_size_table.h", + "cpp/src/sfntly/table/bitmap/composite_bitmap_glyph.cc", + "cpp/src/sfntly/table/bitmap/composite_bitmap_glyph.h", + "cpp/src/sfntly/table/bitmap/ebdt_table.cc", + "cpp/src/sfntly/table/bitmap/ebdt_table.h", + "cpp/src/sfntly/table/bitmap/eblc_table.cc", + "cpp/src/sfntly/table/bitmap/eblc_table.h", + "cpp/src/sfntly/table/bitmap/ebsc_table.cc", + "cpp/src/sfntly/table/bitmap/ebsc_table.h", + "cpp/src/sfntly/table/bitmap/glyph_metrics.cc", + "cpp/src/sfntly/table/bitmap/glyph_metrics.h", + "cpp/src/sfntly/table/bitmap/index_sub_table.cc", + "cpp/src/sfntly/table/bitmap/index_sub_table.h", + "cpp/src/sfntly/table/bitmap/index_sub_table_format1.cc", + "cpp/src/sfntly/table/bitmap/index_sub_table_format1.h", + "cpp/src/sfntly/table/bitmap/index_sub_table_format2.cc", + "cpp/src/sfntly/table/bitmap/index_sub_table_format2.h", + "cpp/src/sfntly/table/bitmap/index_sub_table_format3.cc", + "cpp/src/sfntly/table/bitmap/index_sub_table_format3.h", + "cpp/src/sfntly/table/bitmap/index_sub_table_format4.cc", + "cpp/src/sfntly/table/bitmap/index_sub_table_format4.h", + "cpp/src/sfntly/table/bitmap/index_sub_table_format5.cc", + "cpp/src/sfntly/table/bitmap/index_sub_table_format5.h", + "cpp/src/sfntly/table/bitmap/simple_bitmap_glyph.cc", + "cpp/src/sfntly/table/bitmap/simple_bitmap_glyph.h", + "cpp/src/sfntly/table/bitmap/small_glyph_metrics.cc", + "cpp/src/sfntly/table/bitmap/small_glyph_metrics.h", + "cpp/src/sfntly/table/byte_array_table_builder.cc", + "cpp/src/sfntly/table/byte_array_table_builder.h", + "cpp/src/sfntly/table/core/cmap_table.cc", + "cpp/src/sfntly/table/core/cmap_table.h", + "cpp/src/sfntly/table/core/font_header_table.cc", + "cpp/src/sfntly/table/core/font_header_table.h", + "cpp/src/sfntly/table/core/horizontal_device_metrics_table.cc", + "cpp/src/sfntly/table/core/horizontal_device_metrics_table.h", + "cpp/src/sfntly/table/core/horizontal_header_table.cc", + "cpp/src/sfntly/table/core/horizontal_header_table.h", + "cpp/src/sfntly/table/core/horizontal_metrics_table.cc", + "cpp/src/sfntly/table/core/horizontal_metrics_table.h", + "cpp/src/sfntly/table/core/maximum_profile_table.cc", + "cpp/src/sfntly/table/core/maximum_profile_table.h", + "cpp/src/sfntly/table/core/name_table.cc", + "cpp/src/sfntly/table/core/name_table.h", + "cpp/src/sfntly/table/core/os2_table.cc", + "cpp/src/sfntly/table/core/os2_table.h", + "cpp/src/sfntly/table/font_data_table.cc", + "cpp/src/sfntly/table/font_data_table.h", + "cpp/src/sfntly/table/generic_table_builder.cc", + "cpp/src/sfntly/table/generic_table_builder.h", + "cpp/src/sfntly/table/header.cc", + "cpp/src/sfntly/table/header.h", + "cpp/src/sfntly/table/subtable.cc", + "cpp/src/sfntly/table/subtable.h", + "cpp/src/sfntly/table/subtable_container_table.h", + "cpp/src/sfntly/table/table.cc", + "cpp/src/sfntly/table/table.h", + "cpp/src/sfntly/table/table_based_table_builder.cc", + "cpp/src/sfntly/table/table_based_table_builder.h", + "cpp/src/sfntly/table/truetype/glyph_table.cc", + "cpp/src/sfntly/table/truetype/glyph_table.h", + "cpp/src/sfntly/table/truetype/loca_table.cc", + "cpp/src/sfntly/table/truetype/loca_table.h", + "cpp/src/sfntly/tag.cc", + "cpp/src/sfntly/tag.h", + "cpp/src/sample/chromium/font_subsetter.cc", + "cpp/src/sample/chromium/font_subsetter.h", + "cpp/src/sample/chromium/subsetter_impl.cc", + "cpp/src/sample/chromium/subsetter_impl.h", + ] + + defines = [ "SFNTLY_NO_EXCEPTION" ] + include_dirs = [ "cpp/src" ] + + configs -= "//build/config/compiler:chromium_code" + configs += "//build/config/compiler:no_chromium_code" + + deps = [ "//third_party/icu:icuuc" ] +} diff --git a/tools/gn/secondary/third_party/snappy/BUILD.gn b/tools/gn/secondary/third_party/snappy/BUILD.gn index 578b455..eb42ada 100644 --- a/tools/gn/secondary/third_party/snappy/BUILD.gn +++ b/tools/gn/secondary/third_party/snappy/BUILD.gn @@ -3,18 +3,18 @@ # found in the LICENSE file. config("snappy_config") { - includes = [ + include_dirs = [ "src", ] # These OS-specific generated headers were made by running the configure # script offline. if (is_win) { - includes += "win32" + include_dirs += "win32" } else if (is_mac) { - includes += "mac" + include_dirs += "mac" } else { - includes += "linux" + include_dirs += "linux" } } diff --git a/tools/gn/secondary/third_party/wtl/BUILD.gn b/tools/gn/secondary/third_party/wtl/BUILD.gn index a21ff7e..67b7595 100644 --- a/tools/gn/secondary/third_party/wtl/BUILD.gn +++ b/tools/gn/secondary/third_party/wtl/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. config("wtl_includes") { - includes = [ "include" ] + include_dirs = [ "include" ] } # WTL is only header files so we use a "group" target type which doesn't diff --git a/tools/gn/secondary/third_party/zlib/BUILD.gn b/tools/gn/secondary/third_party/zlib/BUILD.gn index fcacbb3..7724822 100644 --- a/tools/gn/secondary/third_party/zlib/BUILD.gn +++ b/tools/gn/secondary/third_party/zlib/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. config("zlib_config") { - includes = [ "." ] + include_dirs = [ "." ] } static_library("zlib") { diff --git a/tools/gn/secondary/tools/grit/grit_rule.gni b/tools/gn/secondary/tools/grit/grit_rule.gni index 32e5409..735a4da 100644 --- a/tools/gn/secondary/tools/grit/grit_rule.gni +++ b/tools/gn/secondary/tools/grit/grit_rule.gni @@ -52,7 +52,7 @@ template("grit") { # (like "mycomponent/foo.h"). This config sets up the include path. grit_config = target_name + "_grit_config" config(grit_config) { - includes = [ target_gen_dir ] + include_dirs = [ target_gen_dir ] } grit_custom_target = target_name + "_grit" |