-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vs2017が変な警告(D9025)を出してる件について語る #24
Comments
答え見つけました。 https://docs.microsoft.com/en-us/cpp/build/reference/fa-fa-listing-file
|
と思ったけど駄目でした。 |
ですよねw additional opptions に /Wall適用する準備を始めるころまで放置でいいかな、と。 |
issueの目的
vs2017が変な警告を出すようになった。
このまま見て見ぬふりをするか、対策を考えるか・・・。
実はすでに考えているんですけど、
どうも visual studio(というかMSBuildのCPPTask)のバグっぽくて、
ひとりで考えてても仕方ないかな~というわけで、
問題の内容、原因、調べたことを共有することにしました。
問題の内容
sakura-editorのビルド時に変な警告が出ます。
D9025は、同時に指定できないオプションを指定した時に出る警告のようです。
https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/command-line-warning-d9025
警告が出始めたのはアセンブラ出力をutf-8にする対応のあとです。
sakura-editor/sakura#286 (comment)
おまえのせいかいっ!ってツッコミは後にしてください 😢
問題の原因
アセンブラ出力のオプションには色んなものがあります。
https://msdn.microsoft.com/en-us/library/367y26c6.aspx
これらのオプションは組み合わせが可能です。
たとえば、 /FAsu だとマシン語をutf8で出力します。
今回の場合、/FAs と /FAu の2つのオプションが生成されているっぽいです。
オプション指定を結合して /FAsu を生成してくれていたら問題にならないはずだから。
調べたこと
visual studio のビルドシステムは、裏側では MSBuild というもので構成されています。
MSBuild は ant や maven に近いもので、C++だけでなくC#のビルドにも使われます。
C:\Program Files (x86)\MSBuild
に実体があるので、この配下を調べたいキーワードでGrepすると大抵のビルドトラブルは解決することが多いです。
今回調べて分かったことは・・・
UseUnicodeForAssemblerListing
がBoolProperty
であるUseUnicodeForAssemblerListing
には固定のSwitch FAu が割り当てられているさらっとググった感じ、まったく同じ現象で困ってる人が結構前からいたらしいことも分かっています。
http://xanthelasma3.rssing.com/chan-3507589/all_p548.html
まとめ
処理的にこんな感じだと思うんですが、違う実装になってそうなんです。
この部分を実装してあるのは MSBuildのCPPTasks.dllなはずなので、
つまりはそこのバグっぽい気がしています。
途中からjavascriptで書き始めたの後悔したっていうアレですね・・・。
(定義をJSONで書きたかっただけなの。)
で、どうするのが一番現実的か、というところに戻ってくるわけですが、
とりあえずは「見なかったことにする」というのが得策なのかなと思っています。
The text was updated successfully, but these errors were encountered: