<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77559>77559</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Try to compile Modules in libc++, failed
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
R1cardoX
</td>
</tr>
</table>
<pre>
environment:
macos 14.2.1
clang 17.0.6
cmake 3.28.1
ninja 1.11.1
compile modules command:
`/Applications/CMake.app/Contents/bin/cmake -DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-17 -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-17 -G Ninja -S runtimes -B build -DLIBCXX_ENABLE_STD_MODULES=ON -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
`
then I writen a sample:
`import std.compat;
int main() {
std::println("Hello modular world");
}`
compile command:
`/Applications/CMake.app/Contents/bin/cmake -G Ninja -S . -B build -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-17 -DCMAKE_CXX_CLANG_TIDY=/opt/local/bin/clang-tidy-mp-17 -DLIBCXX_BUILD=/Users/jianghao/third_party/llvm-project/build -DCMAKE_CXX_COMPILER_CLANG_SCAN_DEPS=/opt/local/bin/clang-scan-deps-mp-17
`
error:
`_deps/std-src/std.compat/cstdlib.inc:22:9: error: no member named 'quick_exit' in the global namespace; did you mean 'std::quick_exit'? [clang-diagnostic-error]
22 | using ::quick_exit;
| ^~~~~~~~~~~~
| std::quick_exit`
then I open cstdlib.inc, add std, compile success
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVU2T4jYQ_TXi0oXLlgHjgw82xhsqwGzNR2pyomRJA5qRJUeSd4ZLfntKGAOZTWpTlfWpS-rXet3vSSbWir3iPEPTAk3LEencQZvsPqLEMP08qjU7Zlx9E0arhiuH4hyFJQrzhlBtIZoEOIj6FSqJ2kOUBGEwO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