diff --git a/BUILD.gn b/BUILD.gn index 6ae8bd57bce115893f5a2d56493d5058dd126cbb..06480b60feff7f5d5da656a36f9b2246a6e9db40 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,9 +12,6 @@ if (skia_feature_upgrade) { import("m133/gn/shared_sources.gni") import("m133/gn/skia.gni") import("m133/gn/toolchain/wasm.gni") - if (is_arkui_x) { - import("//foundation/arkui/ace_engine/ace_config.gni") - } } if (!skia_feature_upgrade) { import("gn/flutter_defines.gni") @@ -1456,21 +1453,16 @@ optional("gpu") { optional("gif") { enabled = !skia_use_wuffs && skia_use_libgifcodec _libgifcodec_gni_path = "third_party/externals/libgifcodec/libgifcodec.gni" - if ("True" == - exec_script("gn/checkpath.py", - [ rebase_path(_libgifcodec_gni_path, root_build_dir) ], - "trim string")) { - public_defines = [ "SK_USE_LIBGIFCODEC" ] - public_include_dirs = [ - ".", - skia_libgifcodec_path, - ] - include_dirs = public_include_dirs - import(_libgifcodec_gni_path) - sources = rebase_path(libgifcodec_sources + libgifcodec_public, - ".", - skia_libgifcodec_path) - } + public_defines = [ "SK_USE_LIBGIFCODEC" ] + public_include_dirs = [ + ".", + skia_libgifcodec_path, + ] + include_dirs = public_include_dirs + import(_libgifcodec_gni_path) + sources = rebase_path(libgifcodec_sources + libgifcodec_public, + ".", + skia_libgifcodec_path) } optional("heif") { @@ -2348,19 +2340,6 @@ if (use_oh_skia) { } } } - if (is_arkui_x) { - foreach(item, ace_platforms) { - make_skia_deps(item.name) { - platform = item.name - config = { - } - - if (defined(item.config)) { - config = item.config - } - } - } - } } # DebugCanvas used in experimental/wasm-skp-debugger @@ -2610,16 +2589,8 @@ if (skia_enable_tools) { extra_configs = [ ":skia_private" ] launchscreen = "platform_tools/ios/app/LaunchScreen.storyboard" data_sources = [ "resources" ] - if ("True" == exec_script("${skia_root_dir}/gn/checkdir.py", - [ rebase_path("skps", root_build_dir) ], - "trim string")) { - data_sources += [ "skps" ] - } - if ("True" == exec_script("${skia_root_dir}/gn/checkdir.py", - [ rebase_path("mskps", root_build_dir) ], - "trim string")) { - data_sources += [ "mskps" ] - } + data_sources += [ "skps" ] + data_sources += [ "mskps" ] } } else { # !is_ios diff --git a/build/fuchsia/BUILD.gn b/build/fuchsia/BUILD.gn index 1672c26b346e605f50bd53aae71c68c5164f681d..d2bc2a3a95ed04ded500dc175d424ea69dc62884 100644 --- a/build/fuchsia/BUILD.gn +++ b/build/fuchsia/BUILD.gn @@ -7,18 +7,6 @@ assert(is_fuchsia) import("${skia_root_dir}/build/fuchsia/sdk.gni") fuchsia_sdk_manifest_exists = false -if (is_fuchsia && using_fuchsia_sdk) { - manifest_exists = exec_script("${skia_root_dir}/build/fuchsia/file_exists", - [ - "-file_name", - rebase_path(fuchsia_sdk_manifest_path), - ], - "list lines", - [ "${skia_root_dir}/build/fuchsia/file_exists" ]) - if (manifest_exists == [ "true" ]) { - fuchsia_sdk_manifest_exists = true - } -} group("fuchsia") { if (fuchsia_sdk_manifest_exists == true) { diff --git a/build/fuchsia/fuchsia_download_sdk.gni b/build/fuchsia/fuchsia_download_sdk.gni index 2fa71218f207ad089e884d48c426d771a7952cea..b655a95b94218d4fca0569f76716135cd5ccdf50 100644 --- a/build/fuchsia/fuchsia_download_sdk.gni +++ b/build/fuchsia/fuchsia_download_sdk.gni @@ -8,14 +8,4 @@ import("../../gn/skia.gni") if (is_fuchsia && skia_update_fuchsia_sdk && current_toolchain == default_toolchain) { cipd_dir = "${fuchsia_sdk_path}/../cipd" - update_sdk_out = exec_script( - "${skia_root_dir}/build/fuchsia/update_fuchsia_sdk", - [ - "-sdk_dir=" + rebase_path(fuchsia_sdk_path), - "-clang_dir=" + rebase_path(fuchsia_toolchain_path), - "-cipd_cache_dir=" + rebase_path(cipd_dir), - "-cipd_clang_version=git_revision:a6e1de4afc51560df18c95cb616dec51248ed660", - ], - "list lines", - [ "${skia_root_dir}/build/fuchsia/update_fuchsia_sdk" ]) } diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn index e700512529dab3ffcdf6418df3264b44a6e51a81..6cca4b8a3de136c6f87fd82d61462beef661ec0e 100644 --- a/gn/BUILDCONFIG.gn +++ b/gn/BUILDCONFIG.gn @@ -66,14 +66,6 @@ if (current_cpu == "") { is_clang = is_android || is_ios || is_mac || is_fuchsia || (cc == "clang" && cxx == "clang++") || clang_win != "" -if (!is_clang && !is_win) { - is_clang = exec_script("${skia_root_dir}/gn/is_clang.py", - [ - cc, - cxx, - ], - "value") -} if (is_android) { ndk_host = "" @@ -107,41 +99,10 @@ if (target_os == "win") { # By default we look for 2017 (Enterprise, Pro, and Community), then 2015. If MSVC is installed in a # non-default location, you can set win_vc to inform us where it is. - if (win_vc == "") { - win_vc = exec_script("${skia_root_dir}/gn/find_msvc.py", [], "trim string") - } assert(win_vc != "") # Could not find VC installation. Set win_vc to your VC # directory. } -if (target_os == "win") { - if (win_toolchain_version == "") { - win_toolchain_version = - exec_script("${skia_root_dir}/gn/highest_version_dir.py", - [ - "$win_vc/Tools/MSVC", - "[0-9]{2}\.[0-9]{2}\.[0-9]{5}", - ], - "trim string") - } - if (win_sdk_version == "") { - win_sdk_version = exec_script("${skia_root_dir}/gn/highest_version_dir.py", - [ - "$win_sdk/Include", - "[0-9]{2}\.[0-9]\.[0-9]{5}\.[0-9]", - ], - "trim string") - } - if (clang_win != "" && clang_win_version == "") { - clang_win_version = - exec_script("${skia_root_dir}/gn/highest_version_dir.py", - [ - "$clang_win/lib/clang", - "[0-9]+\.[0-9]+\.[0-9]+", - ], - "trim string") - } -} set_defaults("source_set") { configs = [] diff --git a/gn/skia/BUILD.gn b/gn/skia/BUILD.gn index ba0e28c91826f758d5348c91d407fda7474ad58a..a8f3224947c1994ecc989fc495fd001fc035d85d 100644 --- a/gn/skia/BUILD.gn +++ b/gn/skia/BUILD.gn @@ -35,18 +35,12 @@ if (is_ios && xcode_sysroot == "") { sdk = "iphonesimulator" } } - xcode_sysroot = - exec_script("../find_xcode_sysroot.py", [ sdk ], "trim string") } # If building for mac on a mac then lookup all the system includes so that goma and the clang # shipped with chrome can find them. When the gn_to_bp.py tool is run, then the host_os != mac. # In this case leave the xcode_sysroot empty, and the cc/c++ that come with XCode will be able to # find needed include paths. -if (is_mac && host_os == "mac" && xcode_sysroot == "") { - xcode_sysroot = - exec_script("../find_xcode_sysroot.py", [ "macosx" ], "trim string") -} config("default") { asmflags = [] diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn index 718091d3db950b7c5a0c144af9fc59da0a20d4ae..5cc68f7341a2610b91dc615b69df36006af8b49f 100644 --- a/gn/toolchain/BUILD.gn +++ b/gn/toolchain/BUILD.gn @@ -42,7 +42,6 @@ declare_args() { # large -j to Ninja (e.g. Goma build). Unfortunately this is also one of the # slowest steps in a build, so we don't want to limit too much. Use the number # of CPUs as a default. - dlsymutil_pool_depth = exec_script("num_cpus.py", [], "value") # Too many linkers running at once causes issues for some builders. Allow # such builders to limit the number of concurrent link steps. @@ -70,11 +69,7 @@ if (current_toolchain == default_toolchain) { } if (0 <= link_pool_depth) { pool("link_pool") { - if (link_pool_depth == 0) { - depth = exec_script("num_cpus.py", [], "value") - } else { - depth = link_pool_depth - } + depth = link_pool_depth } } } diff --git a/third_party/externals/angle2/BUILD.gn b/third_party/externals/angle2/BUILD.gn index 41c0e3ea4342f8444aa9ab02dd833a5857f92ce2..5a1acd10c8ab5b82e453d1c663d84f15d81fe025 100644 --- a/third_party/externals/angle2/BUILD.gn +++ b/third_party/externals/angle2/BUILD.gn @@ -249,8 +249,6 @@ if (_use_copy_compiler_dll) { # We also ship an older DLL for compatiblity with Windows 7 machines without # the UCRT. This DLL isn't available in the standard SDK distribution. _old_compiler = "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_old.dll" - _has_old_compiler = - exec_script("scripts/file_exists.py", [ _old_compiler ], "value") copy("copy_compiler_dll") { sources = [ "$windows_sdk_path/Redist/D3D/$target_cpu/d3dcompiler_47.dll" ] @@ -676,8 +674,7 @@ action("angle_commit_id") { visibility = [ ":angle_version" ] # Add git as a dependency if it is available. - if (angle_enable_commit_id && - exec_script("src/commit_id.py", [ "check" ], "value") == 1) { + if (angle_enable_commit_id) { # commit id should depend on angle's HEAD revision inputs = [ ".git/HEAD" ] branch = read_file(".git/HEAD", "string") @@ -687,12 +684,6 @@ action("angle_commit_id") { # If git has packed the contents of .git/refs/heads/ in .git/packed-refs, # unpack the head before depending on it. - exec_script("src/commit_id.py", - [ - "unpack", - _ref_file, - ], - "") inputs += [ ".git/" + _ref_file ] } } @@ -1451,10 +1442,6 @@ if (is_android && symbol_level != 0) { if ((angle_standalone || build_with_chromium) && is_android && current_toolchain == default_toolchain) { apk_version_code = "0" - if (angle_enable_commit_id) { - apk_version_code = - exec_script("src/commit_id.py", [ "position" ], "trim string") - } # Package ANGLE libraries for normal use on Android angle_apk("angle_chromium_apk") { diff --git a/third_party/externals/angle2/build_overrides/build.gni b/third_party/externals/angle2/build_overrides/build.gni index 83f0c895006512f3985df7fed31987417e3c8d97..b5697734fdc6f71a1f7ad1fdf6f822a837a182c9 100644 --- a/third_party/externals/angle2/build_overrides/build.gni +++ b/third_party/externals/angle2/build_overrides/build.gni @@ -13,21 +13,6 @@ declare_args() { gtest_enable_absl_printers = false } -if (host_os == "mac" && use_system_xcode == "") { - _result = exec_script("${skia_root_dir}/build/mac/should_use_hermetic_xcode.py", - [ target_os ], - "value") - - assert(_result != 2, - "Do not allow building targets with the default" + - "hermetic toolchain if the minimum OS version is not met.") - assert(_result != 3, - "iOS does not support building with a hermetic toolchain. " + - "Please install Xcode.") - - use_system_xcode = _result != 1 -} - enable_java_templates = true # Build with fewer Android dependencies diff --git a/third_party/externals/dawn/build_overrides/build.gni b/third_party/externals/dawn/build_overrides/build.gni index 49efb4ac2c980fdeedfe2abe908d9c052d8dca8a..687b781706374197b585b54a4c388eb88635958b 100644 --- a/third_party/externals/dawn/build_overrides/build.gni +++ b/third_party/externals/dawn/build_overrides/build.gni @@ -27,17 +27,3 @@ declare_args() { # Detect whether we can use the hermetic XCode like in Chromium and do so if # possible. -if (host_os == "mac" && use_system_xcode == "") { - _result = exec_script("${skia_root_dir}/build/mac/should_use_hermetic_xcode.py", - [ target_os ], - "value") - - assert(_result != 2, - "Do not allow building targets with the default" + - "hermetic toolchain if the minimum OS version is not met.") - assert(_result != 3, - "iOS does not support building with a hermetic toolchain. " + - "Please install Xcode.") - - use_system_xcode = _result != 1 -} diff --git a/third_party/externals/spirv-tools/build_overrides/build.gni b/third_party/externals/spirv-tools/build_overrides/build.gni index ef92bbc01e3b36c7e2ab3606bcdaad0828c10fbd..0be8a7fb552e18f448c563954bab95e38e2dcf55 100644 --- a/third_party/externals/spirv-tools/build_overrides/build.gni +++ b/third_party/externals/spirv-tools/build_overrides/build.gni @@ -29,15 +29,3 @@ declare_args() { # FORCE_MAC_TOOLCHAIN]. use_system_xcode = "" } - -if (use_system_xcode == "") { - if (target_os == "mac") { - _result = exec_script("${skia_root_dir}/build/mac/should_use_hermetic_xcode.py", - [ target_os ], - "value") - use_system_xcode = _result == 0 - } - if (target_os == "ios") { - use_system_xcode = true - } -} diff --git a/third_party/externals/swiftshader/third_party/SPIRV-Tools/build_overrides/build.gni b/third_party/externals/swiftshader/third_party/SPIRV-Tools/build_overrides/build.gni index ef92bbc01e3b36c7e2ab3606bcdaad0828c10fbd..0be8a7fb552e18f448c563954bab95e38e2dcf55 100644 --- a/third_party/externals/swiftshader/third_party/SPIRV-Tools/build_overrides/build.gni +++ b/third_party/externals/swiftshader/third_party/SPIRV-Tools/build_overrides/build.gni @@ -29,15 +29,3 @@ declare_args() { # FORCE_MAC_TOOLCHAIN]. use_system_xcode = "" } - -if (use_system_xcode == "") { - if (target_os == "mac") { - _result = exec_script("${skia_root_dir}/build/mac/should_use_hermetic_xcode.py", - [ target_os ], - "value") - use_system_xcode = _result == 0 - } - if (target_os == "ios") { - use_system_xcode = true - } -}