File:  [NetBSD Developer Wiki] / wikisrc / tutorials / clang.mdwn
Revision 1.9: download - view: text, annotated - select for diffs
Wed Nov 7 06:59:14 2018 UTC (23 months, 3 weeks ago) by wiki
Branches: MAIN
CVS tags: HEAD
web commit by maya: mention PKGSRC_COPMILER which might be needed, markdown touchups

    1: Since NetBSD 6, the base system has included clang.  
    2: It works on ARM, PowerPC, x86, and possibly SPARC64, but is not built by default.  
    3: To use it, set in mk.conf.
    4: 
    5:     MKGCC=no
    6:     MKLLVM=yes
    7:     HAVE_LLVM=yes
    8:     PKGSRC_COMPILER=clang
    9:     CLANGBASE=/usr
   10: 
   11: And run "build.sh release". This will apply for both pkgsrc and base.
   12: 
   13: 
   14: 
   15: tunable                | explanation
   16: -----------------------|----------------------------------------------------
   17: MKGCC=no               | needed as building GCC alongside is not maintained
   18: MKLLVM=yes             | builds LLVM libraries
   19: HAVE_LLVM=yes          | controls clang being built
   20: PKGSRC_COMPILER=clang  | instructs pkgsrc it's clang
   21: CLANGBASE=/usr         | instructs pkgsrc where to look for the compiler
   22: 
   23: # status
   24: 
   25: [[NetBSD-current clang build status|https://releng.netbsd.org/builds/HEAD-llvm/]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb