Change the 'libcef_static' target type from static_library to source_set

Using a source_set here keeps the linker on Windows from discarding exported
compilation units that are not directly called from inside libcef_static.

This may also fix linker errors on Linux due to CEF's use of an intermediate
static library (see https://crbug.com/1319006#c2).
This commit is contained in:
Marshall Greenblatt
2022-07-29 12:21:17 -04:00
parent bbc08e4f5e
commit 27525523be
4 changed files with 1 additions and 36 deletions

View File

@@ -22,19 +22,6 @@ constexpr const char kCategory[] = "cef.client";
} // namespace
// The contents of this file are a compilation unit that is not called by other
// functions in the the library. Consiquently MSVS will exclude it during the
// linker stage if we don't call a stub function.
#if defined(COMPILER_MSVC)
#pragma optimize("", off)
#endif
void base_impl_stub() {}
#if defined(COMPILER_MSVC)
#pragma optimize("", on)
#endif
CEF_EXPORT void cef_trace_event_instant(const char* /* category */,
const char* name,
const char* arg1_name,