ilg-ul wrote: > for your use case, can you stick symlinks in to preserve that toolchain > folder structure relative to the ~/tmp/clang++ symlink? i.e. make that > ~/tmp/bin/clang++ -> > /Users/ilg/Library/xPacks/@xpack-dev-tools/clang/15.0.7-3.1/.content/bin/clang-15 > and add ~/tmp/lib -> > /Users/ilg/Library/xPacks/@xpack-dev-tools/clang/15.0.7-3.1/.content/lib (and > same for include).
I'm not sure I understand your proposal, but I'm afraid changing the structure of the symlinks is not possible, it is done automatically by a tool. The example above was just to demonstrate the bug. In the actual use case, which is inspired by the npm use case, in the project there is a folder `xpacks` with symlinks to all dependent binaries, with dual indirections, something like this: ``` ilg@wksi native-cmake-clang13-debug % ls -lAR xpacks total 0 drwxr-xr-x 61 ilg staff 1952 Oct 31 14:42 .bin drwxr-xr-x 3 ilg staff 96 Oct 31 14:42 @micro-os-plus drwxr-xr-x 3 ilg staff 96 Oct 31 14:42 @xpack-dev-tools xpacks/.bin: total 0 lrwxr-xr-x 1 ilg staff 44 Oct 31 14:42 clang -> ../@xpack-dev-tools/clang/.content/bin/clang lrwxr-xr-x 1 ilg staff 46 Oct 31 14:42 clang++ -> ../@xpack-dev-tools/clang/.content/bin/clang++ lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 clang-check -> ../@xpack-dev-tools/clang/.content/bin/clang-check lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 clang-cl -> ../@xpack-dev-tools/clang/.content/bin/clang-cl lrwxr-xr-x 1 ilg staff 48 Oct 31 14:42 clang-cpp -> ../@xpack-dev-tools/clang/.content/bin/clang-cpp lrwxr-xr-x 1 ilg staff 48 Oct 31 14:42 clang-doc -> ../@xpack-dev-tools/clang/.content/bin/clang-doc lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 clang-format -> ../@xpack-dev-tools/clang/.content/bin/clang-format lrwxr-xr-x 1 ilg staff 60 Oct 31 14:42 clang-offload-bundler -> ../@xpack-dev-tools/clang/.content/bin/clang-offload-bundler lrwxr-xr-x 1 ilg staff 60 Oct 31 14:42 clang-offload-wrapper -> ../@xpack-dev-tools/clang/.content/bin/clang-offload-wrapper lrwxr-xr-x 1 ilg staff 53 Oct 31 14:42 clang-refactor -> ../@xpack-dev-tools/clang/.content/bin/clang-refactor lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 clang-rename -> ../@xpack-dev-tools/clang/.content/bin/clang-rename lrwxr-xr-x 1 ilg staff 54 Oct 31 14:42 clang-scan-deps -> ../@xpack-dev-tools/clang/.content/bin/clang-scan-deps lrwxr-xr-x 1 ilg staff 49 Oct 31 14:42 clang-tidy -> ../@xpack-dev-tools/clang/.content/bin/clang-tidy lrwxr-xr-x 1 ilg staff 45 Oct 31 14:42 clangd -> ../@xpack-dev-tools/clang/.content/bin/clangd lrwxr-xr-x 1 ilg staff 61 Oct 31 14:42 clangd-xpc-test-client -> ../@xpack-dev-tools/clang/.content/bin/clangd-xpc-test-client lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 darwin-debug -> ../@xpack-dev-tools/clang/.content/bin/darwin-debug lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 diagtool -> ../@xpack-dev-tools/clang/.content/bin/diagtool lrwxr-xr-x 1 ilg staff 55 Oct 31 14:42 git-clang-format -> ../@xpack-dev-tools/clang/.content/bin/git-clang-format lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 hmaptool -> ../@xpack-dev-tools/clang/.content/bin/hmaptool lrwxr-xr-x 1 ilg staff 45 Oct 31 14:42 ld.lld -> ../@xpack-dev-tools/clang/.content/bin/ld.lld lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 ld64.lld -> ../@xpack-dev-tools/clang/.content/bin/ld64.lld lrwxr-xr-x 1 ilg staff 57 Oct 31 14:42 ld64.lld.darwinnew -> ../@xpack-dev-tools/clang/.content/bin/ld64.lld.darwinnew lrwxr-xr-x 1 ilg staff 42 Oct 31 14:42 lld -> ../@xpack-dev-tools/clang/.content/bin/lld lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 lld-link -> ../@xpack-dev-tools/clang/.content/bin/lld-link lrwxr-xr-x 1 ilg staff 43 Oct 31 14:42 lldb -> ../@xpack-dev-tools/clang/.content/bin/lldb lrwxr-xr-x 1 ilg staff 53 Oct 31 14:42 lldb-argdumper -> ../@xpack-dev-tools/clang/.content/bin/lldb-argdumper lrwxr-xr-x 1 ilg staff 49 Oct 31 14:42 lldb-instr -> ../@xpack-dev-tools/clang/.content/bin/lldb-instr lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 lldb-server -> ../@xpack-dev-tools/clang/.content/bin/lldb-server lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 lldb-vscode -> ../@xpack-dev-tools/clang/.content/bin/lldb-vscode lrwxr-xr-x 1 ilg staff 53 Oct 31 14:42 llvm-addr2line -> ../@xpack-dev-tools/clang/.content/bin/llvm-addr2line lrwxr-xr-x 1 ilg staff 46 Oct 31 14:42 llvm-ar -> ../@xpack-dev-tools/clang/.content/bin/llvm-ar lrwxr-xr-x 1 ilg staff 46 Oct 31 14:42 llvm-as -> ../@xpack-dev-tools/clang/.content/bin/llvm-as lrwxr-xr-x 1 ilg staff 57 Oct 31 14:42 llvm-bitcode-strip -> ../@xpack-dev-tools/clang/.content/bin/llvm-bitcode-strip lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 llvm-config -> ../@xpack-dev-tools/clang/.content/bin/llvm-config lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 llvm-cov -> ../@xpack-dev-tools/clang/.content/bin/llvm-cov lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-cxxdump -> ../@xpack-dev-tools/clang/.content/bin/llvm-cxxdump lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-cxxfilt -> ../@xpack-dev-tools/clang/.content/bin/llvm-cxxfilt lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 llvm-cxxmap -> ../@xpack-dev-tools/clang/.content/bin/llvm-cxxmap lrwxr-xr-x 1 ilg staff 48 Oct 31 14:42 llvm-diff -> ../@xpack-dev-tools/clang/.content/bin/llvm-diff lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 llvm-dis -> ../@xpack-dev-tools/clang/.content/bin/llvm-dis lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-dlltool -> ../@xpack-dev-tools/clang/.content/bin/llvm-dlltool lrwxr-xr-x 1 ilg staff 47 Oct 31 14:42 llvm-lib -> ../@xpack-dev-tools/clang/.content/bin/llvm-lib lrwxr-xr-x 1 ilg staff 58 Oct 31 14:42 llvm-libtool-darwin -> ../@xpack-dev-tools/clang/.content/bin/llvm-libtool-darwin lrwxr-xr-x 1 ilg staff 46 Oct 31 14:42 llvm-nm -> ../@xpack-dev-tools/clang/.content/bin/llvm-nm lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-objcopy -> ../@xpack-dev-tools/clang/.content/bin/llvm-objcopy lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-objdump -> ../@xpack-dev-tools/clang/.content/bin/llvm-objdump lrwxr-xr-x 1 ilg staff 52 Oct 31 14:42 llvm-profdata -> ../@xpack-dev-tools/clang/.content/bin/llvm-profdata lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 llvm-ranlib -> ../@xpack-dev-tools/clang/.content/bin/llvm-ranlib lrwxr-xr-x 1 ilg staff 46 Oct 31 14:42 llvm-rc -> ../@xpack-dev-tools/clang/.content/bin/llvm-rc lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-readelf -> ../@xpack-dev-tools/clang/.content/bin/llvm-readelf lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-readobj -> ../@xpack-dev-tools/clang/.content/bin/llvm-readobj lrwxr-xr-x 1 ilg staff 48 Oct 31 14:42 llvm-size -> ../@xpack-dev-tools/clang/.content/bin/llvm-size lrwxr-xr-x 1 ilg staff 51 Oct 31 14:42 llvm-strings -> ../@xpack-dev-tools/clang/.content/bin/llvm-strings lrwxr-xr-x 1 ilg staff 49 Oct 31 14:42 llvm-strip -> ../@xpack-dev-tools/clang/.content/bin/llvm-strip lrwxr-xr-x 1 ilg staff 54 Oct 31 14:42 llvm-symbolizer -> ../@xpack-dev-tools/clang/.content/bin/llvm-symbolizer lrwxr-xr-x 1 ilg staff 50 Oct 31 14:42 llvm-tblgen -> ../@xpack-dev-tools/clang/.content/bin/llvm-tblgen lrwxr-xr-x 1 ilg staff 57 Oct 31 14:42 set-xcode-analyzer -> ../@xpack-dev-tools/clang/.content/bin/set-xcode-analyzer lrwxr-xr-x 1 ilg staff 49 Oct 31 14:42 split-file -> ../@xpack-dev-tools/clang/.content/bin/split-file lrwxr-xr-x 1 ilg staff 46 Oct 31 14:42 wasm-ld -> ../@xpack-dev-tools/clang/.content/bin/wasm-ld xpacks/@micro-os-plus: total 0 lrwxr-xr-x 1 ilg staff 75 Oct 31 14:42 architecture-synthetic-posix -> /Users/ilg/Library/xPacks/@micro-os-plus/architecture-synthetic-posix/4.0.2 xpacks/@xpack-dev-tools: total 0 lrwxr-xr-x 1 ilg staff 59 Oct 31 14:42 clang -> /Users/ilg/Library/xPacks/@xpack-dev-tools/clang/13.0.1-1.1 ilg@wksi native-cmake-clang13-debug % ``` This project in particular has binary dependencies only to clang, but other projects can also have dependencies to cmake, ninja, etc, and all binaries are linked in the `.bin` folder. With the proposed change, clang correctly idenifies the proper `include/c++/v1` folder from the final destination where the toolchain is installed. https://github.com/llvm/llvm-project/pull/70817 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits