blob: d89f186e6085eabca16b399065e4b442dd1c0ff1 [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
import("//build/zircon/migrated_targets.gni")
import("//zircon/system/ulib/hwreg/hwreg_asm_header.gni")
zx_library("x86") {
kernel = true
host = true
static = true
visibility = [ "../*" ]
sources = []
public_deps = [
# <lib/arch/x86/cpuid.h> has #include <hwreg/bitfields.h>.
"//zircon/system/ulib/hwreg:headers",
]
deps = [ "//zircon/system/ulib/hwreg" ]
include_dirs = [ "../include" ]
public_deps += [ ":gen-cpuid-asm" ]
if (!is_host) {
sources = [
"boot-cpuid.S",
"boot-cpuid.cc",
]
if (toolchain.environment != "kernel.phys32") {
sources += [ "descriptor-regs.S" ]
}
}
sdk = "source"
sdk_headers = [ "lib/arch/intrin.h" ]
sdk_migrated = true
}
hwreg_asm_header("gen-cpuid-asm") {
output_name = "lib/arch/x86/cpuid-asm.h"
sources = [ "gen-cpuid-asm.cc" ]
deps = [ ".." ]
}