1 import("//llvm/version.gni")
3 lto_target_type = "shared_library"
4 if (host_os != "mac" && host_os != "win") {
5 # ELF targets need -fPIC to build shared libs but they aren't on by default.
6 # For now, make libclang a static lib there.
7 lto_target_type = "static_library"
10 target(lto_target_type, "lto") {
13 "//llvm/lib/Bitcode/Reader",
17 "//llvm/lib/MC/MCDisassembler",
20 "//llvm/lib/Target:TargetsToBuild",
23 "LTODisassembler.cpp",
27 if (host_os == "mac") {
29 "-Wl,-compatibility_version,1",
30 "-Wl,-current_version,$llvm_version",
32 # See llvm_setup_rpath() in CMake.
33 "-Wl,-install_name,@rpath/libLTO.dylib",
34 "-Wl,-rpath,@loader_path/../lib",
38 # FIXME: Use lto.exports