0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

llvmのPassのコンパイル実行

Posted at

『きつねさんでもわかるLLVMコンパイラを自作するためのガイドブック』の本にはPassのコンパイルを行うときに g++ -g ./src/easypass.cpp -I./inc `llvm-config --cflags --ldflags --libs` -c -o easypass.o でeasypass.oを作成し、 g++ -g -sahred -o ./bin/easypass.so easypass.o で共有ライブラリを作成し、 opt -load ./bin/easypass.so -easypass ./sample/test.ll -S > /dev/null で共有ライブラリをロードしているが、 エラー文:undefined symbol: _ZTIN4llvm12FunctionPassE が出力されたので、 g++ -g (easypass.cppを指定) `llvm-config --cxxflags --ldflags --libs` -c -o (easypass.oを作成する場所) で--cxxflagsでc++を指定したらエラーが直った。

--?の機能は今後気が向いたら調べていこうと思う(多分やらない)

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?