﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AIdeasman42%2FBlenderClang</id>
	<title>利用者:Ideasman42/BlenderClang - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AIdeasman42%2FBlenderClang"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Ideasman42/BlenderClang&amp;action=history"/>
	<updated>2026-07-13T09:14:00Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Ideasman42/BlenderClang&amp;diff=101911&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Ideasman42/BlenderClang&amp;diff=101911&amp;oldid=prev"/>
		<updated>2018-06-28T19:40:42Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 19:40時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Ideasman42/BlenderClang&amp;diff=101910&amp;oldid=prev</id>
		<title>wiki&gt;Ideasman42: /* Configuring CMake */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Ideasman42/BlenderClang&amp;diff=101910&amp;oldid=prev"/>
		<updated>2012-08-24T10:56:53Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configuring CMake&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Installing LLVM &amp;amp; Clang from svn (tested on linux) inst_llvm.sh==&lt;br /&gt;
Use this if you cant get a pre-compiled llvm/clang or if you want to have the lastest clang.&lt;br /&gt;
&lt;br /&gt;
This script installs llvm &amp;amp; clang from source, re-running will update the installation.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
SRCDIR=&amp;quot;/opt/src&amp;quot;&lt;br /&gt;
INSTDIR=&amp;quot;/opt/llvm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ -d $SRCDIR/llvm/.svn ] ; then&lt;br /&gt;
	echo &amp;quot;Updating &amp;quot;$SRCDIR&amp;quot;/llvm ...&amp;quot;&lt;br /&gt;
	svn up $SRCDIR/llvm $SRCDIR/llvm/tools/clang&lt;br /&gt;
else&lt;br /&gt;
	echo &amp;quot;Checking out &amp;quot;$SRCDIR&amp;quot;/llvm ...&amp;quot;&lt;br /&gt;
	svn checkout http://llvm.org/svn/llvm-project/llvm/trunk $SRCDIR/llvm&lt;br /&gt;
	svn checkout http://llvm.org/svn/llvm-project/cfe/trunk $SRCDIR/llvm/tools/clang&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rm -rf $INSTDIR&lt;br /&gt;
&lt;br /&gt;
mkdir $SRCDIR/llvm_cmake&lt;br /&gt;
cd $SRCDIR/llvm_cmake&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;Building...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cmake ../llvm \&lt;br /&gt;
	-DCMAKE_INSTALL_PREFIX:STRING=$INSTDIR \&lt;br /&gt;
	-DCMAKE_BUILD_TYPE:STRING=Debug \&lt;br /&gt;
	-DLLVM_ENABLE_THREADS:BOOL=ON&lt;br /&gt;
&lt;br /&gt;
make -j6&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;Installing...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-view/scan-view $INSTDIR/bin/&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-view/*.py $INSTDIR/bin/&lt;br /&gt;
&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-build/scan-build $INSTDIR/bin/&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-build/ccc-analyzer $INSTDIR/bin/&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-build/c++-analyzer $INSTDIR/bin/&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-build/sorttable.js $INSTDIR/bin/&lt;br /&gt;
cp $SRCDIR/llvm/tools/clang/tools/scan-build/scanview.css $INSTDIR/bin/&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;&amp;quot;&lt;br /&gt;
echo &amp;quot;Done!&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring CMake ==&lt;br /&gt;
Assuming you know about building with cmake and blender&lt;br /&gt;
see: [[Dev:2.5/Doc/Building_Blender/Linux/Ubuntu/CMake]]&lt;br /&gt;
&lt;br /&gt;
clang will need to be added to the $PATH, edit your ~/.bashrc and add this line.&lt;br /&gt;
 export PATH=$PATH:/opt/llvm/bin&lt;br /&gt;
&lt;br /&gt;
Run cmake with these args.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cmake ../blender \&lt;br /&gt;
	-DCMAKE_CXX_COMPILER:FILEPATH=/opt/clang/bin/c++-analyzer \&lt;br /&gt;
	-DCMAKE_C_COMPILER:FILEPATH=/opt/clang/bin/ccc-analyzer&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
note:&lt;br /&gt;
* You may need to explicitly add in GCC includes, eg:&amp;lt;br&amp;gt;-DCMAKE_CXX_FLAGS:STRING=&amp;quot;-I/usr/include/c++/4.5.2 -I/usr/include/c++/4.5.2/x86_64-unknown-linux-gnu&amp;quot;&lt;br /&gt;
* /usr/share/clang/scan-build/c++-analyzer is the default path if you use a pre-compiled build&lt;br /&gt;
* on GCC 4.6 you may get an error with __extern_always_inline&amp;lt;br&amp;gt;In this case you can use -DCMAKE_CXX_FLAGS:STRING=&amp;quot;-D__extern_always_inline=inline&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Compiling Blender ==&lt;br /&gt;
&lt;br /&gt;
The usual make in the cmake dir will build blender however clang can output nice error html like this&lt;br /&gt;
 http://www.graphicall.org/ftp/ideasman42/2011-01-07-2/&lt;br /&gt;
&lt;br /&gt;
To get this html output run...&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
export CCC_ANALYZER_CPLUSPLUS=1  # for C++ analysis &lt;br /&gt;
scan-build -o /tmp/clang make -j6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After building (takes about an 1.5 hrs for me), you will have a directory like /tmp/clang/2011-01-07-2/ with html ouput of scan-build.&lt;br /&gt;
&lt;br /&gt;
== Continuous Static Checker Server ==&lt;br /&gt;
Currently we have blender static check running on a server.&lt;br /&gt;
&lt;br /&gt;
* http://clang.blenderheads.org/trunk - Main Page&lt;br /&gt;
* http://clang.blenderheads.org/trunk.clang.txt - Build Output for LLVM/CLang&lt;br /&gt;
* http://clang.blenderheads.org/trunk.blender.txt - Build Output for Blender&lt;br /&gt;
&lt;br /&gt;
This is doing C checks only because there is a header issue with clang and gcc headers on this system.&lt;/div&gt;</summary>
		<author><name>wiki&gt;Ideasman42</name></author>
		
	</entry>
</feed>