[libclc] [libclc] Pass -fapprox-func when compiling 'native' builtins (PR #133119)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 27 03:34:46 PDT 2025


frasercrmck wrote:

I've pushed an update with uses the `COMPILE_OPTIONS` property. It's definitely better, thanks for the suggestion.

It would be best if there were `CMakeLists.txt` in each sub-directory which added the properties. However, because we currently have this system where targets include from multiple directories (e.g., r600 includes stuff from `r600/`, `amdgpu/` and `generic/`), and you can only `add_subdirectory` once, it gets a bit complicated. We'd have to ensure that `generic` is only included once, but that would also mean that it would be harder to do target-specific things in there. It might be possible (I think you can set a custom (target-specific?) build directory in `add_subdirectory`), but for now I'm just setting the properties in the top-level CMakeLists.txt. I'd be a bit nervous of rewriting the build system at this time.

https://github.com/llvm/llvm-project/pull/133119


More information about the cfe-commits mailing list