llvm-mos-sdk icon indicating copy to clipboard operation
llvm-mos-sdk copied to clipboard

Building fails unless SDK and compiler version match exactly

Open johnwbyrd opened this issue 3 months ago • 2 comments

On line 17 of mos-platform/common/crt/CMakeLists.txt, there is the following line:

find_library(builtins clang_rt.builtins REQUIRED PATHS ${compiler_dir}/../lib/clang/22/lib/mos-unknown-unknown NO_DEFAULT_PATH)

This code forces each release of the SDK to match a specific version of the compiler, EXACTLY. Failing to follow this rule causes odd breakages when referring to clang builtins. This is quite fragile.

The SDK should probably get the right directories from one of the following:

mos-clang -print-search-dirs
mos-clang -print-resource-dir

johnwbyrd avatar Sep 04 '25 05:09 johnwbyrd

This is a good idea; I have been rather annoyed by trying to keep this up to date when pulling from upstream too. I may take this on the next time I need to change this.

mysterymath avatar Sep 04 '25 05:09 mysterymath

+1 :)

iss000 avatar Sep 04 '25 06:09 iss000