blob: f2465c1060a647d050b4f4bdee895c83ea200272 [file] [log] [blame]
# Copyright 2019 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("$zx_build/public/gn/migrated_targets.gni")
source_set("x86") {
sources = [
"memcpy.S",
"memset.S",
]
deps = [ "$zx/kernel/lib/code_patching:headers" ]
if (toolchain.environment == "kernel") {
sources += [ "selector.cc" ]
deps += [
":tests",
"$zx/kernel/lib/code_patching",
]
} else {
# TODO(mcgrathr): Make the assembly compatible with phys.
# For now, just use the C.
sources = []
deps = []
sources = [
"$zx/kernel/lib/libc/string/memcpy.c",
"$zx/kernel/lib/libc/string/memset.c",
]
deps = [ "$zx/kernel/lib/libc:headers" ]
}
}
source_set("tests") {
# TODO(mcgrathr): Make this optional somehow and enable testonly taint.
# testonly = true
sources = [ "tests.cc" ]
deps = [ "$zx/kernel/lib/unittest" ]
}