Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #248

Closed
wants to merge 15 commits into from
Prev Previous commit
Next Next commit
First pass at libdeno.
  • Loading branch information
ry committed Jun 10, 2018
commit 3062039ffe5563cab1f80b2d7da2d9c7e468c462
24 changes: 14 additions & 10 deletions deno2/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,34 @@ create_snapshot("deno") {

v8_executable("snapshot_creator") {
sources = [
"deno.cc",
"deno.h",
"snapshot_creator.cc",
]
configs = [ "v8:libplatform_config" ]
deps = [
"v8:v8",
"v8:v8_libbase",
"v8:v8_libplatform",
"v8:v8_libsampler",
"//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
":libdeno",
]
}

v8_executable("deno") {
sources = [
"deno.cc",
"deno.h",
"main.cc",
]
include_dirs = [ target_gen_dir ]
configs = [ "v8:libplatform_config" ]
deps = [
":create_snapshot_deno",
":libdeno",
]
}

v8_component("libdeno") {
sources = [
"deno.cc",
"include/deno.h",
]
include_dirs = [ "include/" ]
configs = [ "v8:libplatform_config" ]
deps = [
":msg_proto",
"v8:v8",
"v8:v8_libbase",
Expand All @@ -129,6 +132,7 @@ executable("deno_test") {
"deno_test.cc",
]
deps = [
":libdeno",
"//testing/gtest:gtest",
]
}
2 changes: 1 addition & 1 deletion deno2/deno.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ IN THE SOFTWARE.
#include "v8/include/libplatform/libplatform.h"
#include "v8/include/v8.h"

#include "./deno.h"
#include "include/deno.h"

#define CHECK(x) assert(x) // TODO(ry) use V8's CHECK.

Expand Down
2 changes: 1 addition & 1 deletion deno2/deno_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// All rights reserved. MIT License.
#include "testing/gtest/include/gtest/gtest.h"

#include "./deno.h"
#include "include/deno.h"

TEST(SnapshotTest, InitializesCorrectly) {
EXPECT_TRUE(true);
Expand Down
6 changes: 3 additions & 3 deletions deno2/deno.h → deno2/include/deno.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 Ryan Dahl <[email protected]>
// All rights reserved. MIT License.
#ifndef DENO_H_
#define DENO_H_
#ifndef INCLUDE_DENO_H_
#define INCLUDE_DENO_H_

#include <string>
#include "v8/include/v8.h"
Expand Down Expand Up @@ -48,4 +48,4 @@ void deno_terminate_execution(Deno* d);

} // namespace deno

#endif // DENO_H_
#endif // INCLUDE_DENO_H_
2 changes: 1 addition & 1 deletion deno2/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "v8/include/v8.h"

#include "./deno.h"
#include "include/deno.h"
#include "natives_deno.cc"
#include "snapshot_deno.cc"

Expand Down
2 changes: 1 addition & 1 deletion deno2/snapshot_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "v8/include/v8.h"

#include "./deno.h"
#include "include/deno.h"

class StartupDataCppWriter {
public:
Expand Down
2 changes: 1 addition & 1 deletion deno2/tools/lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
cd `dirname "$0"`/..
set -e -v
cpplint --repository=. *.cc *.h
cpplint --repository=. *.cc *.h include/*.h