* feat(sys): support cross-compiling to Windows with cargo-xwin
Building `cef-dll-sys` for `x86_64-pc-windows-msvc` from a Linux host with
cargo-xwin failed while compiling `libcef_dll_wrapper` with clang-cl, for
four reasons that are now handled in the build script:
- CEF's CMake clears `CMAKE_CXX_FLAGS` for the Ninja generator, dropping
the toolchain's `--target` and `/imsvc` include paths. They are now passed
through `CEF_C_COMPILER_FLAGS`/`CEF_CXX_COMPILER_FLAGS` instead, which CEF
appends after its own flags.
- clang-cl reports diagnostics that MSVC doesn't (`/MP` is unsupported,
`-Wmissing-field-initializers`, `-Wundefined-var-template`) and CEF's `/WX`
turned them into errors. Those are silenced and `/WX-` is appended.
- The Windows SDK import libraries were merged into the wrapper archive
through `CMAKE_STATIC_LINKER_FLAGS`, which llvm-lib can't do because it
rejects the XFG hash map member of current import libraries. They are
now emitted as `cargo::rustc-link-lib` directives for the final link.
- The SDK expects case-insensitive header lookups (`Softpub.h` vs
`SoftPub.h`). Mismatched headers get a correctly-cased copy in an extra
include directory under `OUT_DIR`.
The `cc` crate is used to detect clang-cl and to read the target CXXFLAGS,
so this is a no-op for native MSVC builds. A CI job cross-compiles the
`cefsimple` example on ubuntu-latest to keep this working.
* fix(sys): join clang-cl options that take a separate argument
cargo-xwin 0.23 exports the SDK include paths as `/imsvc <dir>` (two
tokens) where 0.19 used `/imsvc<dir>`. CMake de-duplicates compile
options, so every repeated `/imsvc` after the first was dropped and the
bare paths were passed to clang-cl as additional source files:
clang-cl: error: cannot specify '/Fo...' when compiling multiple source files
Join such option/value pairs into a single token before handing the flags
to CMake, and only add the clang-cl specific flags that aren't already
present so de-duplication has nothing left to remove.
* ci: use LLVM 20 for the Windows cross-compile job
The MSVC STL headers that cargo-xwin downloads now refuse compilers older
than Clang 19 (STL1000), and ubuntu-latest ships Clang 18. Install LLVM 20
from apt.llvm.org and put it first on PATH: cargo-xwin symlinks its
`clang-cl` to the `clang` found there, so only the SDK directory is cached.
* cleanup
---------
Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
feat: unify bundle utilities under cef build-util feature
feat: reenable sandbox support in cefsimple
feat: add MainMenu.xib on mac
fix: bypass tryToTerminateApplication for Command+Q
fix: enable much smaller linux release builds