version 1.7, 2018/11/07 06:49:49
|
version 1.8, 2018/11/07 06:56:34
|
Line 1
|
Line 1
|
This page explains how to use clang with the NetBSD base system. |
Since NetBSD 6, the base system has included clang. |
See also [how to use clang to build packages](../pkgsrc/clang/). |
It works on ARM, PowerPC, x86, and possibly SPARC64, but is not built by default. |
|
To use it, set in mk.conf. |
Since NetBSD 6, the base system has included clang, but it is not |
|
built or used by default. To use it, set in mk.conf |
|
|
|
MKGCC=no |
MKGCC=no |
MKLLVM=yes |
MKLLVM=yes |
Line 11 built or used by default. To use it, set
|
Line 9 built or used by default. To use it, set
|
|
|
And run "build.sh release". This will apply for both pkgsrc and base. |
And run "build.sh release". This will apply for both pkgsrc and base. |
|
|
This will work on ARM, PowerPC, x86, and possibly SPARC64. |
|
|
|
# Explanation |
|
|
|
|
tunable | explanation |
|
-----------------------|---------------------------------------------------- |
MKGCC=no | needed as building GCC alongside is not maintained. |
MKGCC=no | needed as building GCC alongside is not maintained. |
MKLLVM=yes | builds LLVM libraries. |
MKLLVM=yes | builds LLVM libraries. |
HAVE_LLVM=yes | controls clang being built |
HAVE_LLVM=yes | controls clang being built |
Line 22 CLANGBASE=/usr | instructs pkgsr
|
Line 20 CLANGBASE=/usr | instructs pkgsr
|
|
|
# status |
# status |
|
|
On NetBSD-current, clang builds successfully on several architectures. |
[[NetBSD-current clang build status|https://releng.netbsd.org/builds/HEAD-llvm/]] |
These builds are with all three of the above flags enabled. |
|
|
|
https://releng.netbsd.org/builds/HEAD-llvm/ |
|