blob: 58f62f5e9c8d704e95f5eeeb3f6f70b2bf1d4adb [file] [log] [blame] [edit]
# 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("//build/dist/resource.gni")
import("//third_party/quickjs/compiled_js.gni")
static_library("console") {
sources = [
"command_line_options.cc",
"command_line_options.h",
"console.cc",
"console.h",
"li.cc",
"li.h",
"repl.cc",
"repl.h",
]
public_deps = [
":repl_init",
"//src/developer/shell/josh/lib",
"//third_party/quickjs:qjs-lib",
"//third_party/quickjs:repl",
"//zircon/system/ulib/cmdline",
]
configs += [
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
#
# Might be hard because these conversions come from quickjs.h.
"//build/config:Wno-conversion",
]
}
compiled_js("repl_init") {
source = "repl_init.js"
module = true
extra_args = [
"-M",
"li_internal",
]
}
resource("startup_js") {
sources = [
"//src/developer/shell/josh/lib/js/optional/task.js",
"startup.json",
]
outputs = [ "data/lib/startup/{{source_file_part}}" ]
}
source_set("tests") {
testonly = true
sources = [
"command_line_options_test.cc",
"console_test.cc",
"repl_test.cc",
]
deps = [
":console",
"//src/storage/memfs",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
configs += [
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
#
# Might be hard because these conversions come from quickjs.h.
"//build/config:Wno-conversion",
]
}