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
[LLD] C++20 Modules - unclosed quote #61198
Comments
@llvm/issue-subscribers-clang-modules |
I don't understand the problem fully. But |
Based on: https://releases.llvm.org/15.0.0/tools/clang/docs/StandardCPlusPlusModules.html#quick-start # LLVM 15.0.6 (ubuntu 22.04)
$> clang++ -std=c++20 Hello.cppm --precompile -o Hello.pcm
Hello.cppm:2:10: fatal error: 'iostream' file not found
#include <iostream>
^~~~~~~~~~
1 error generated.
$> clang++ -std=c++20 Hello.cppm --precompile -o Hello.pcm -stdlib=libc++ # no issue
# zig v0.10.1 - LLVM 15.0.7
$> zig c++ -std=c++20 Hello.cppm --precompile -o Hello.pcm
LLD Link... ld.lld: error: Hello.cppm:1: unknown directive: module
>>> module;
>>> ^ |
This is an issue in Zig or the user. ld.lld recognizes several object file formats and treats others as linker scripts. |
As described in the title, it would be the error referring to trying to link using
ld.lld
, unlike other platforms.This was a test with Zig (LLVM 15.0.7) toolchain.
https://gist.github.com/kassane/7e9a2da137e13eb6e1dbab726693bdb7
Fix:
$ cp $(zig c++ -std=c++20 -fmodules -fbuiltin-module-map -fmodules-ts -Xclang -emit-module-interface -c moduleTest.cpp -o moduleTest.pcm 2>&1 | grep "ld.lld: error" | sed 's/.*error: \(.*\):[0-9]\+.*/\1/g') moduleTest.pcm
The text was updated successfully, but these errors were encountered: