diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 16:55:04 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 16:55:04 -0500 |
| commit | df92abca8ee2a8f9093efea7fcaa4dadc3ddaebc (patch) | |
| tree | 97ef8f95544fe263049d3f7360823f16100de209 /runtime/cmake/opus_decoder.cmake | |
| parent | 49a0b69fcdb80db1f2a44ce7ca0ab8dfdec1e403 (diff) | |
| parent | e5a7c8942678b323f655939c81f5d8855d20c248 (diff) | |
Merge main e5a7c8942 into shadow-aliased-guard (#1867)
One conflict, runtime/README.md: this branch rewrote the LEONIDA_SHADOW_ALIAS_MS
row, main (#2163) added the LEONIDA_SHADOW_KEEP row after it. Both rows kept;
the keep row's "aliased" now reads "aliased while they can't be guarded at every
address", since aliased pages are no longer copied without a sign of a write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/cmake/opus_decoder.cmake')
| -rw-r--r-- | runtime/cmake/opus_decoder.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/runtime/cmake/opus_decoder.cmake b/runtime/cmake/opus_decoder.cmake new file mode 100644 index 000000000..1286b15fa --- /dev/null +++ b/runtime/cmake/opus_decoder.cmake | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # Resolves -DLEONIDA_OPUS_DECODER_LIB=<path> for runtime/CMakeLists.txt. | ||
| 2 | # | ||
| 3 | # When LEONIDA_OPUS_DECODER_LIB is set, the runtime links that prebuilt static library directly and | ||
| 4 | # skips running cargo at configure time. A value that does not name an existing file is a configure | ||
| 5 | # error rather than a silent fallback to silent XAPU output. | ||
| 6 | function(leonida_resolve_prebuilt_opus_decoder lib_input base_dir out_var) | ||
| 7 | if(NOT lib_input) | ||
| 8 | set(${out_var} "" PARENT_SCOPE) | ||
| 9 | return() | ||
| 10 | endif() | ||
| 11 | if(IS_ABSOLUTE "${lib_input}") | ||
| 12 | set(_resolved "${lib_input}") | ||
| 13 | else() | ||
| 14 | cmake_path(ABSOLUTE_PATH lib_input BASE_DIRECTORY "${base_dir}" NORMALIZE OUTPUT_VARIABLE _resolved) | ||
| 15 | endif() | ||
| 16 | if(EXISTS "${_resolved}" AND NOT IS_DIRECTORY "${_resolved}") | ||
| 17 | set(${out_var} "${_resolved}" PARENT_SCOPE) | ||
| 18 | else() | ||
| 19 | message(FATAL_ERROR | ||
| 20 | "LEONIDA_OPUS_DECODER_LIB does not point to an existing file: ${_resolved} " | ||
| 21 | "(pass the path to leonida_opus_decoder.lib or leave it empty to build with cargo)") | ||
| 22 | endif() | ||
| 23 | endfunction() | ||