Fix a missing symbol issue with CaptureReplayTests

The constructor for PlatformMethods is declared with
__declspec(dllimport) when included in CaptureReplayTests.cpp,
Ordinarily, this would fail to link on Windows because this test doesn't
link against a library that has an exported definition. This test
currently builds on Windows because Clang generates an
available_externally definition in the object file for
CaptureReplayTests.cpp for inlining. However, this doesn't build if
inlining is disabled, and will no longer build once an upcoming Clang
change is rolled in. To fix this, we add the config libANGLE_config to
the test to change the symbol declaration to __declspec(dllexport),
which appears to be what other ANGLE tests do.

Bug: chromium:1468150
Change-Id: Ia92dde31ab624bbfe64d2e81fad18956abebc41b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4728461
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Alan Zhao
2023-07-27 16:43:09 -07:00
committed by Angle LUCI CQ
parent c319f34c4c
commit 391bfa3579

View File

@@ -45,7 +45,10 @@ angle_executable("capture_replay_tests") {
"$angle_root:libGLESv2",
]
configs += [ "$angle_root:library_name_config" ]
configs += [
"$angle_root:library_name_config",
"${angle_root}:libANGLE_config",
]
defines = []
if ((is_linux || is_chromeos) && !is_component_build) {