Skip to content

--sysroot does not setup correct include paths #597

@rgrr

Description

@rgrr

Summary
See subject

To Reproduce

  1. create an empty main.cpp or something else
  2. invoke "clang --sysroot /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/armv8m.main_soft_nofp_unaligned_size --target=armv8m.main-none-eabi -v main.cpp"

Expected behavior
output shows correct include paths

Actual behavior
output shows formerly valid include paths which are now wrong

Environment
21.1.1, Debian testing, Release

[Additional context]
From 20.1.0 to 21.1.1 directory structure of clang-runtimes was changed: now all architectures share an include path under which common header files are kept. This avoids duplicate header files.
Unfortunately the include path created via --sysroot still shows the old structure.

-isysroot         /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/armv8m.main_soft_nofp_unaligned_size
-internal-isystem /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/armv8m.main_soft_nofp_unaligned_size/include/c++/v1
-internal-isystem /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/armv8m.main_soft_nofp_unaligned_size/include

Actually it should be

-isysroot         /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/armv8m.main_soft_nofp_unaligned_size
-internal-isystem /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/include/c++/v1
-internal-isystem /home/hardy/bin/llvm-arm-none-eabi/lib/clang-runtimes/arm-none-eabi/include

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions