- C++, Rust, TypeScript
kazatsuyu / fafnir Goto Github PK
View Code? Open in Web Editor NEWClang MSBuild toolset for Visual Studio 2017
License: MIT License
Clang MSBuild toolset for Visual Studio 2017
License: MIT License
一度ビルドしていても再びビルドする際に0からやり直している
(コメントアウトしているけど)install.ps1にはそれ用のスクリプトも入れてあるので、それも使えるようにしたい
#9 より
こちらのクラッシュはLLVMのものだったが、LLVMのホストアーキテクチャと食い違っていた場合も何かしらの問題は出るはずなので、実行ファイルのアーキテクチャを調べるようにする
First, thanks for the very useful MSBuild add-in. I've used it with VS2017 and it works very well.
I have installed choosing names v100_clang_fafnir
and fafnir_clang_cl
.
Is there any way to uninstall the toolsets?
VS2017 - 15.7.1
CLANG/LLVM 6.0.0
Attempting to build with v100_clang_fafnir results in an immediate failure with this as the only error;
Error MSB4018 The "MultiToolTask" task failed unexpectedly.
System.InvalidOperationException: Task attempted to log before it was initialized. Message was: Element <DebugInformationFormat> has an invalid value of "ProgramDatabase".
at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args)
at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowInvalidOperation(Boolean condition, String resourceName, Object arg0)
at Microsoft.Build.Utilities.TaskLoggingHelper.LogError(String subcategory, String errorCode, String helpKeyword, String file, Int32 lineNumber, Int32 columnNumber, Int32 endLineNumber, Int32 endColumnNumber, String message, Object[] messageArgs)
at Microsoft.Build.Utilities.TaskLoggingHelper.LogErrorFromResources(String messageResourceName, Object[] messageArgs)
at Microsoft.Build.CPPTasks.VCToolTask.ReadSwitchMap(String propertyName, String[][] switchMap, String value)
at Microsoft.Build.CPPTasks.ClangCompile.set_DebugInformationFormat(String value) Macropod C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Clang.targets 130
方法を検討する
現状、64bit環境じゃないと動かないはず。
とりあえず書いてみたものの絶対破綻しているので英語に強い人がいたら助けて下さい。
I tried to write README.md in English, but it's probably broken. Please help me.
Clang MSBuild toolset for Visual Studio 2017
This is a MSBuild toolset with LLVM Clang for Windows.
First, Download the ratest release.
Its host architecture must be same to Clang for Windows.
Run install.bat, and set LLVM path and toolset name.
Administrator authority is required for installaion.
To use with CMake, the toolset name must matches v[0-9]+_clang_.*
.
Open a project property, select [Configuration Properties -> General] in the left list,
select [Platform toolset] in [General] groupe, and select the toolset name that you named during installation (default name is v100_clang_fafnir).
Then you can build using LLVM clang.
When you run cmake command, set -G
option "Visual Studio 15 2017"
or "Visual Studio 15 2017 Win64"
, and set -T
iotion the name that you named during installation.
The toolset that installed by Fafnir is required to build Fafnir.
Also, LLVM must be support C++17. (The releases are build by LLVM Snapshot Build)
CMake is also required.
cmake -G "Visual Studio 15 2017 Win64" -T <installed Fafnir toolset> -DCMAKE_INSTALL_PREFIX=<path to install>
cmake --build . --config Release --target INSTALL
cmake -G "Visual Studio 15 2017" -T <installed Fafnir toolset> -DCMAKE_INSTALL_PREFIX=<path to install>
cmake --build . --config Release --target INSTALL
Run above command, you get deployed files in path to install.
Release x86 でコンパイルできません。clang.exe がクラッシュするようです。Debug x86 / Debug x64 / Release x64 では何れもコンパイル・実行できます (訂正: 何れの設定でも同様にクラッシュするようです)。もしかすると、こちらの設定の問題の可能性もありますが、ご報告します。
状況
C:\Program Files\LLVM
を指定して後は既定の設定でインストールした。v100_clang_fafnir
にした。clang.exe
がクラッシュする。以下 出力
画面の内容です。
1>------ ビルド開始: プロジェクト: ConsoleApplication1, 構成: Release Win32 ------
1>stdafx.cpp
1>stdafx.h
1>Wrote crash dump file "C:\Users\murase\AppData\Local\Temp\clang.exe-bd458e.dmp"
1>0x00007FF78472AD15 (0x0000000000000001 0x00007FF700000000 0x000001F9126C2E80 0x000001F91263D2C0)
1>0x00007FF78474337A (0x0000006A9578D8B0 0x000001F9126C2E80 0x0000000000000000 0x00007FF78461636B)
1>0x00007FF784740541 (0x000001F9126C2E70 0x0000000000000000 0x000001F9126BF460 0x0000000000000001)
1>0x00007FF78470C719 (0x0000006A9578D950 0x0000000000000000 0x000001F9126C2E70 0x0000000000000000)
1>0x00007FF784097CCC (0x0000000000000000 0x00007FFA15260A58 0x0000000000000040 0x0000000000000030)
1>0x00007FF7846129C2 (0x0000000000000000 0x0000000000000000 0x0000000000000050 0x000001F91261E9C0)
1>0x00007FF78407FDDA (0x00007FFA14F96D90 0x00007FF700000002 0x000001F900000002 0x00007FF700000002)
1>0x00007FF78404B460 (0x0000006A9578DC38 0x00007FF78404601B 0x000001F91263A1F0 0x0000000000000038)
1>0x00007FF7840C027C (0x000000000000007E 0x00000000000003F0 0x000000C0FFFFFEED 0x000001F91262A880)
1>0x00007FF7829A5E6B (0x0000000000000074 0x0000000000000000 0x0000000000000000 0x0000000000000000)
1>0x00007FF7829A4293 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
1>0x00007FF785322D81 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
1>0x00007FFA15F01FE4 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
1>0x00007FFA189EEFC1 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
1>clang.exe : error : clang frontend command failed due to signal (use -v to see invocation)
1>clang version 5.0.1 (tags/RELEASE_501/final)
1>Target: i686-pc-windows-msvc
1>Thread model: posix
1>InstalledDir: C:\Program Files\LLVM\bin
1>clang.exe: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
1>clang.exe: note: diagnostic msg:
1>********************
1>
1>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
1>Preprocessed source(s) and associated run script(s) are located at:
1>clang.exe: note: diagnostic msg: C:\Users\murase\AppData\Local\Temp\stdafx-daef12.hh
1>clang.exe: note: diagnostic msg: C:\Users\murase\AppData\Local\Temp\stdafx-daef12.sh
1>clang.exe: note: diagnostic msg:
1>
1>********************
1>プロジェクト "ConsoleApplication1.vcxproj" のビルドが終了しました -- 失敗。
========== ビルド: 0 正常終了、1 失敗、0 更新不要、0 スキップ ==========
2019年4月リリース予定の Visual Studio 2019 への対応予定はありますでしょうか。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.