BUILD.gn 2.6 KB
import("//llvm/utils/gn/build/write_vcsrevision.gni")

config("write_vcsrevision_config") {
  # To pick up the generated inc file.
  include_dirs = [ target_gen_dir ]
  visibility = [ ":write_vcsrevision" ]
}

write_vcsrevision("write_vcsrevision") {
  visibility = [ ":Basic" ]
  header = "$target_gen_dir/VCSVersion.inc"
  names = [
    "LLVM",
    "CLANG",
  ]
  public_configs = [ ":write_vcsrevision_config" ]
}

static_library("Basic") {
  output_name = "clangBasic"
  configs += [ "//llvm/utils/gn/build:clang_code" ]
  public_deps = [
    # public_dep because public header Version.h includes generated Version.inc.
    "//clang/include/clang/Basic:AttrList",
    "//clang/include/clang/Basic:AttrSubMatchRulesList",
    "//clang/include/clang/Basic:DiagnosticGroups",
    "//clang/include/clang/Basic:arm_mve_builtins",
    "//clang/include/clang/Basic:diags_tablegen",
    "//clang/include/clang/Basic:version",
  ]
  deps = [
    ":write_vcsrevision",
    "//clang/include/clang/Basic:AttrHasAttributeImpl",
    "//clang/include/clang/Basic:arm_fp16",
    "//clang/include/clang/Basic:arm_neon",
    "//clang/include/clang/Config",
    "//llvm/include/llvm/Config:llvm-config",
    "//llvm/lib/IR",
    "//llvm/lib/MC",
    "//llvm/lib/Support",
  ]
  include_dirs = [ "." ]
  sources = [
    "Attributes.cpp",
    "Builtins.cpp",
    "CharInfo.cpp",
    "CodeGenOptions.cpp",
    "Cuda.cpp",
    "Diagnostic.cpp",
    "DiagnosticIDs.cpp",
    "DiagnosticOptions.cpp",
    "FileManager.cpp",
    "FileSystemStatCache.cpp",
    "FixedPoint.cpp",
    "IdentifierTable.cpp",
    "LangOptions.cpp",
    "LangStandards.cpp",
    "Module.cpp",
    "ObjCRuntime.cpp",
    "OpenMPKinds.cpp",
    "OperatorPrecedence.cpp",
    "SanitizerBlacklist.cpp",
    "SanitizerSpecialCaseList.cpp",
    "Sanitizers.cpp",
    "SourceLocation.cpp",
    "SourceManager.cpp",
    "Stack.cpp",
    "TargetInfo.cpp",
    "Targets.cpp",
    "Targets/AArch64.cpp",
    "Targets/AMDGPU.cpp",
    "Targets/ARC.cpp",
    "Targets/ARM.cpp",
    "Targets/AVR.cpp",
    "Targets/BPF.cpp",
    "Targets/Hexagon.cpp",
    "Targets/Lanai.cpp",
    "Targets/Le64.cpp",
    "Targets/MSP430.cpp",
    "Targets/Mips.cpp",
    "Targets/NVPTX.cpp",
    "Targets/OSTargets.cpp",
    "Targets/PNaCl.cpp",
    "Targets/PPC.cpp",
    "Targets/RISCV.cpp",
    "Targets/SPIR.cpp",
    "Targets/Sparc.cpp",
    "Targets/SystemZ.cpp",
    "Targets/TCE.cpp",
    "Targets/WebAssembly.cpp",
    "Targets/X86.cpp",
    "Targets/XCore.cpp",
    "TokenKinds.cpp",
    "Version.cpp",
    "Warnings.cpp",
    "XRayInstr.cpp",
    "XRayLists.cpp",
  ]
  defines = [ "HAVE_VCS_VERSION_INC" ]  # For Version.cpp
}