blob: 548fed52212b0ca32e5a8f9d60105207ac7172ef [file] [log] [blame]
# Copyright 2019 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("hermetic_module.gni")
if (is_hermetic) {
# This is for hermetic_module() targets to use in deps.
# It's not to used in programs that link to hermetic-compute.
library("hermetic-engine") {
sources = []
public_deps = [
# <lib/hermetic-compute/hermetic-engine.h> -> <zircon/syscalls.h>
"$zx/system/ulib/zircon:headers",
]
public_configs = [ ":hermetic-engine.config" ]
}
config("hermetic-engine.config") {
visibility = [ ":*" ]
defines = [ "HERMETIC_COMPUTE_MODULE" ]
}
}
# This is the library for loading and launching hermetic engine modules.
library("hermetic-compute") {
sources = []
public_deps = [
# <lib/hermetic-compute/hermetic-compute.h> -> <fbl/macros.h>
"$zx/system/ulib/fbl:headers",
# <lib/hermetic-compute/hermetic-compute.h> -> <lib/zx/vmar.h>
"$zx/system/ulib/zx:headers",
]
# Just the headers can be used in the hermetic engine environment itself.
if (toolchain.environment != "hermetic") {
sources += [
"hermetic-compute.cc",
"launch.cc",
]
deps = [
"$zx/system/ulib/elfload",
"$zx/system/ulib/zx",
]
}
# Other "hermetic" environments like userboot can use most of the
# library, but not this.
if (!is_hermetic) {
sources += [ "get-vdso.cc" ]
deps += [ "$zx/system/ulib/fdio" ]
}
}