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

Pass /no-preprocess flag to llvm-rc 16+ #64

Closed
wants to merge 1 commit into from

Conversation

roblabla
Copy link
Contributor

@roblabla roblabla commented Jan 5, 2024

Since LLVM 16, llvm-rc supports doing the preprocessing itself. However, doing so requires having clang in the PATH, which some more complex toolchain may not necessarily have (for instance, for windows, you may have clang-cl but no clang in PATH, or you may have a target-prefixed clang like x86_64-pc-windows-msvc-clang).

If llvm-rc fails to find clang, it will error out with a message saying it failed to find the program in PATH.

To avoid these issues, we continue doing the preprocessing manually, and pass the /no-preprocess flag to llvm-rc if it is supported.

Since LLVM 16, llvm-rc supports doing the preprocessing itself. However,
doing so requires having `clang` in the PATH, which some more complex
toolchain may not necessarily have (for instance, for windows, you may
have `clang-cl` but no `clang` in PATH, or you may have a
target-prefixed clang like `x86_64-pc-windows-msvc-clang`).

If llvm-rc fails to find clang, it will error out with a message saying
it failed to find the program in PATH.

To avoid these issues, we continue doing the preprocessing manually, and
pass the /no-preprocess flag to llvm-rc.
@nabijaczleweli
Copy link
Owner

nabijaczleweli commented Jan 5, 2024

It's so funny that a substring search is not part of the standard library. Validated against llvm trunk 1:18~++20231231112334+c7c912cff945-1~exp1~20231231112352.433. Applied with minor editorial changes as 25a77c4.

Please close if you can, closing hasn't worked for me in weeks.

@nabijaczleweli
Copy link
Owner

Released in v2.4.1, backported to v1.6.12.

@roblabla
Copy link
Contributor Author

roblabla commented Jan 5, 2024

Thanks :)

@roblabla roblabla closed this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants