| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//src/lib/llvm/llvm_library.gni") |
| |
| config("LLVM_config") { |
| visibility = [ ":*" ] |
| |
| include_dirs = [ "${llvm_prefix}/${current_platform}/include" ] |
| if (current_os == "linux") { |
| libs = [ "${llvm_prefix}/${current_platform}/lib/libLLVM.so" ] |
| } else if (current_os == "mac") { |
| libs = [ "${llvm_prefix}/${current_platform}/lib/libLLVM.dylib" ] |
| } |
| } |
| |
| # Shared library |
| group("LLVM") { |
| public_configs = [ ":LLVM_config" ] |
| } |
| |
| config("LLVMHeader_config") { |
| # elflib depends on LLVM headers and is compiled on target. Since we don't have Fuchsia variant |
| # of LLVM library yet, always use host_platform's include directory for now. |
| # It should make no difference as headers are the same across different platforms. |
| # Use -isystem instead of -I to suppress -Wconversion warnings in those headers. |
| cflags = [ "-isystem" + rebase_path("${llvm_prefix}/${host_platform}/include", |
| root_build_dir) ] |
| } |