Commit 11c31e0a by Stephen White Committed by Commit Bot

Changes to build inside a Dawn checkout.

Add an "angle_standalone" flag that can be disabled by Dawn. Put test definitions behind angle_standalone || build_with_chromium. Bug: angleproject:5462 Change-Id: I58c9b18723384334156e2a3dd86ed3f89afcaade Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2587451Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
parent 0c5a55a5
...@@ -1118,7 +1118,7 @@ angle_executable("angle_shader_translator") { ...@@ -1118,7 +1118,7 @@ angle_executable("angle_shader_translator") {
deps = [ ":translator" ] deps = [ ":translator" ]
} }
if (angle_has_build) { if (angle_standalone || build_with_chromium) {
config("angle_feature_support_config") { config("angle_feature_support_config") {
include_dirs = [ include_dirs = [
"include", "include",
......
...@@ -101,6 +101,9 @@ declare_args() { ...@@ -101,6 +101,9 @@ declare_args() {
# worker thread pool. # worker thread pool.
angle_delegate_workers = build_with_chromium angle_delegate_workers = build_with_chromium
# True if we are building inside an ANGLE checkout.
angle_standalone = !build_with_chromium
angle_enable_d3d9 = is_win && !angle_is_winuwp angle_enable_d3d9 = is_win && !angle_is_winuwp
angle_enable_d3d11 = is_win angle_enable_d3d11 = is_win
angle_enable_gl = (ozone_platform_gbm || (!is_linux && !is_chromeos) || angle_enable_gl = (ozone_platform_gbm || (!is_linux && !is_chromeos) ||
...@@ -310,74 +313,76 @@ template("angle_static_library") { ...@@ -310,74 +313,76 @@ template("angle_static_library") {
} }
} }
template("angle_test") { if (angle_standalone || build_with_chromium) {
test(target_name) { template("angle_test") {
forward_variables_from(invoker, test(target_name) {
"*", forward_variables_from(invoker,
[ "*",
"configs", [
"data", "configs",
"public_deps", "data",
]) "public_deps",
])
configs += invoker.configs
configs -= invoker.suppressed_configs configs += invoker.configs
configs -= invoker.suppressed_configs
public_deps = invoker.public_deps + [
"$angle_root:angle_common", public_deps = invoker.public_deps + [
"$angle_root:includes", "$angle_root:angle_common",
"$angle_root/util:angle_test_utils", "$angle_root:includes",
"$angle_root/third_party/rapidjson:rapidjson", "$angle_root/util:angle_test_utils",
"//testing/gmock", "$angle_root/third_party/rapidjson:rapidjson",
"//testing/gtest", "//testing/gmock",
"//third_party/googletest:gmock", "//testing/gtest",
"//third_party/googletest:gtest", "//third_party/googletest:gmock",
] "//third_party/googletest:gtest",
]
data = invoker.data + [
"$angle_root/scripts/run_gtest_angle_test.py", data = invoker.data + [
"//testing/scripts/common.py", "$angle_root/scripts/run_gtest_angle_test.py",
"//testing/xvfb.py", "//testing/scripts/common.py",
] "//testing/xvfb.py",
]
sources += [
"$angle_root/src/tests/test_utils/runner/HistogramWriter.h", sources += [
"$angle_root/src/tests/test_utils/runner/TestSuite.cpp", "$angle_root/src/tests/test_utils/runner/HistogramWriter.h",
"$angle_root/src/tests/test_utils/runner/TestSuite.h", "$angle_root/src/tests/test_utils/runner/TestSuite.cpp",
] "$angle_root/src/tests/test_utils/runner/TestSuite.h",
if (angle_has_histograms) {
sources +=
[ "$angle_root/src/tests/test_utils/runner/HistogramWriter.cpp" ]
deps += [
"//third_party/catapult/tracing/tracing:histogram",
"//third_party/catapult/tracing/tracing:reserved_infos",
] ]
}
if (is_mac && angle_enable_metal) { if (angle_has_histograms) {
# On macOS, compiling Metal shader sometimes takes very long time due to internal caching sources +=
# mechanism. This hooking library is a way to bypass this caching mechanism. [ "$angle_root/src/tests/test_utils/runner/HistogramWriter.cpp" ]
deps += [ "$angle_root/src/libANGLE/renderer/metal/file_hooking:metal_shader_cache_file_hooking" ] deps += [
} "//third_party/catapult/tracing/tracing:histogram",
"//third_party/catapult/tracing/tracing:reserved_infos",
]
}
if ((is_linux && !is_chromeos) || if (is_mac && angle_enable_metal) {
(build_with_chromium && chromeos_is_browser_only)) { # On macOS, compiling Metal shader sometimes takes very long time due to internal caching
use_xvfb = true # mechanism. This hooking library is a way to bypass this caching mechanism.
} deps += [ "$angle_root/src/libANGLE/renderer/metal/file_hooking:metal_shader_cache_file_hooking" ]
}
if ((is_linux || is_chromeos) && !is_component_build) { if ((is_linux && !is_chromeos) ||
# Set rpath to find shared libs in a non-component build. (build_with_chromium && chromeos_is_browser_only)) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] use_xvfb = true
} }
if (is_android) { if ((is_linux || is_chromeos) && !is_component_build) {
public_configs += [ "$angle_root:build_id_config" ] # Set rpath to find shared libs in a non-component build.
if (build_with_chromium) { configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
use_native_activity = true }
configs -= [ "//build/config/android:hide_all_but_jni" ]
} else { if (is_android) {
use_raw_android_executable = true public_configs += [ "$angle_root:build_id_config" ]
if (build_with_chromium) {
use_native_activity = true
configs -= [ "//build/config/android:hide_all_but_jni" ]
} else {
use_raw_android_executable = true
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment