diff options
| author | Arthur LAURENT <[email protected]> | 2025-04-30 16:48:24 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-04-30 16:48:24 +0200 |
| commit | a3c6564682e58d41effc5b1c17ca789a29b3d8a0 (patch) | |
| tree | 04a84b2f1c9d4e9c09a05b836d04f8c960454025 /xmake/modules | |
| parent | 2774ecbc0961e1e2b1f995d8937b44c2c90e11c6 (diff) | |
(runtimes) fix support of macOS homebrew llvm for --runtimes
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/clang.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/clang.lua b/xmake/modules/core/tools/clang.lua index 1b16d2710..4dc6cd415 100644 --- a/xmake/modules/core/tools/clang.lua +++ b/xmake/modules/core/tools/clang.lua @@ -284,6 +284,12 @@ function nf_runtime(self, runtime, opt) local libdir = path.absolute(path.join(llvm_rootdir, "lib")) maps["c++_static"] = table.join(maps["c++_static"], "-L" .. libdir) maps["c++_shared"] = table.join(maps["c++_shared"], "-L" .. libdir) + -- sometimes llvm c++ runtimes are located in c++ subfolder (e.g homebrew llvm) + local cxx_libdir = path.join(libdir, "c++") + if os.isdir(cxx_libdir) then + maps["c++_static"] = table.join(maps["c++_static"], "-L" .. cxx_libdir) + maps["c++_shared"] = table.join(maps["c++_shared"], "-L" .. cxx_libdir) + end -- sometimes llvm runtimes are located in a target-triple subfolder local target_triple = _get_llvm_target_triple(self) local triple_libdir = (target_triple and os.isdir(path.join(libdir, target_triple))) and path.join(libdir, target_triple) |
