有没有办法告诉 qmake 向 Makefile 添加一个包含指令以包含其他 Makefile。
我需要在生成的 Makefile 的开头添加一行:
包括custom.inc
也许只有一种方法可以将文本从 qmake 输出到 Makfiles,但我找不到。
我在 MacOS 上从头开始构建 Clang,但我遇到了问题。
使用以下配置 Clang 进行构建:
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/clang-12 -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;X86" -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;lldb" ../llvm
Run Code Online (Sandbox Code Playgroud)
这是我的测试程序:
#include <ostream>
#include <algorithm>
int main(int argc, char** argv) {
return 0;
}
Run Code Online (Sandbox Code Playgroud)
如果使用 XCode 附带的 Clang 11.0.3 编译,则可以 clang++ -c test.cc
如果使用新的 Clang 12(内置),则出错 /opt/clang-12/bin/clang++ -c test.cc
In file included from test.cc:2:
In file included from /opt/clang-12/bin/../include/c++/v1/ostream:138:
In file included from /opt/clang-12/bin/../include/c++/v1/ios:214:
In file included from /opt/clang-12/bin/../include/c++/v1/iosfwd:95:
/opt/clang-12/bin/../include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
#include_next <wchar.h>
^~~~~~~~~
1 error generated.
Run Code Online (Sandbox Code Playgroud)
根据我尝试包含的内容,我会收到不同的包含错误。
? …Run Code Online (Sandbox Code Playgroud)