Build omc with cmake when cmake flags are given - #290
Merged
Conversation
The wasm-jit simulation target only exists in the Rust port of the compiler, which is built by cmake, whereas the library testing builds omc with GNU autotools. Give `runRegressiontest` a `cmakeFlags` parameter: when it is non-empty the tested omc is configured and installed with cmake instead, with the flags shared by every target (release, clang, `-march=native`, no ccache/GUI/OMSimulator) added by the function. The install prefix stays `OMCompiler/build`, so the omc cache in `~/saved_omc` and `OPENMODELICAHOME` are unaffected. The wasm-jit stage passes `-DOM_OMC_ENABLE_RUST=ON -DRUST_OMC_CI=ON -DRUST_OMC_THREADS=4` and is the only stage that builds with cmake. Rust builds also use the shared sccache bucket that the OpenModelica job populates from the same commits. Hitting its keys requires the same rust settings (`CARGO_PROFILE_RELEASE_OPT_LEVEL=2`, `-Zthreads=4`) and `SCCACHE_BASEDIRS` pointing at the checkout directory, which is a subdirectory of the workspace here but the workspace itself there. A node without sccache builds uncached, and an unusable S3 backend warns rather than failing the tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sjoelund
enabled auto-merge (squash)
August 4, 2026 16:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wasm-jit simulation target only exists in the Rust port of the compiler, which is built by cmake, whereas the library testing builds omc with GNU autotools. Give
runRegressiontestacmakeFlagsparameter: when it is non-empty the tested omc is configured and installed with cmake instead, with the flags shared by every target (release, clang,-march=native, no ccache/GUI/OMSimulator) added by the function. The install prefix staysOMCompiler/build, so the omc cache in~/saved_omcandOPENMODELICAHOMEare unaffected.The wasm-jit stage passes
-DOM_OMC_ENABLE_RUST=ON -DRUST_OMC_CI=ON -DRUST_OMC_THREADS=4and is the only stage that builds with cmake.Rust builds also use the shared sccache bucket that the OpenModelica job populates from the same commits. Hitting its keys requires the same rust settings (
CARGO_PROFILE_RELEASE_OPT_LEVEL=2,-Zthreads=4) andSCCACHE_BASEDIRSpointing at the checkout directory, which is a subdirectory of the workspace here but the workspace itself there. A node without sccache builds uncached, and an unusable S3 backend warns rather than failing the tests.