Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stddef.h and related include errors in runtime #1

Open
Artalus opened this issue May 7, 2018 · 0 comments
Open

Fix stddef.h and related include errors in runtime #1

Artalus opened this issue May 7, 2018 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@Artalus
Copy link
Owner

Artalus commented May 7, 2018

Right now when started not from system path like /bin or /usr/bin, the tool argues that it cannot locate include files stddef.h, stdint.h etc. when parsing system headers like <iostream>. This of course causes mayhem and incorrect behavior.

The issue is related to clang builtin includes. To quote:

the default location to look for builtin headers is in a path $(dirname /path/to/tool)/../lib/clang/3.3/include relative to the tool binary. This works out-of-the-box for tools running from llvm’s toplevel binary directory after building clang-headers, or if the tool is running from the binary directory of a clang install next to the clang binary.

Another clue from pro.cxx

Berkus Decker, [15.03.18 11:09]
it is not /usr/bin, it is clang-install-dir wherever you've installed it, it is considered as root, since that's the way relocatable toolchain is done in LLVM

Another clue.

Once fixed, apply the same to leak-marker.

@Artalus Artalus added the help wanted Extra attention is needed label May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant