Earl Ou has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/58949 )

Change subject: bazel
......................................................................

bazel

Change-Id: I8013b4544b9922f35bcafbb383cc7f1b4d0c11e7
---
A BUILD
A WORKSPACE
A bazel-bin
A bazel-out
A bazel-testlogs
A bazel-upstream
A builddef.bzl
A ext/dnet/BUILD
A ext/iostream3/BUILD
A hello/BUILD
A hello/hello.cc
A src/base/BUILD
A src/dev/BUILD
A src/sim/BUILD
14 files changed, 185 insertions(+), 0 deletions(-)



diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..d2d6a7e
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,18 @@
+load("//:builddef.bzl", "config")
+
+package(default_visibility = ["//visibility:public"])
+
+config("have_deprecated_namespace", 1)
+
+config("have_fenv", 1)
+
+config("have_valgrind", 0)
+
+cc_library(
+    name = "config",
+    hdrs = [
+        "config/have_deprecated_namespace.hh",
+        "config/have_fenv.hh",
+        "config/have_valgrind.hh",
+    ],
+)
diff --git a/WORKSPACE b/WORKSPACE
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/WORKSPACE
diff --git a/bazel-bin b/bazel-bin
new file mode 120000
index 0000000..19a8d18
--- /dev/null
+++ b/bazel-bin
@@ -0,0 +1 @@
+/usr/local/google/home/shunhsingou/.cache/bazel/_bazel_shunhsingou/49565d7c865eb89d24e99f6508df830b/execroot/__main__/bazel-out/k8-fastbuild/bin
\ No newline at end of file
diff --git a/bazel-out b/bazel-out
new file mode 120000
index 0000000..28dd258
--- /dev/null
+++ b/bazel-out
@@ -0,0 +1 @@
+/usr/local/google/home/shunhsingou/.cache/bazel/_bazel_shunhsingou/49565d7c865eb89d24e99f6508df830b/execroot/__main__/bazel-out
\ No newline at end of file
diff --git a/bazel-testlogs b/bazel-testlogs
new file mode 120000
index 0000000..d68ff1d
--- /dev/null
+++ b/bazel-testlogs
@@ -0,0 +1 @@
+/usr/local/google/home/shunhsingou/.cache/bazel/_bazel_shunhsingou/49565d7c865eb89d24e99f6508df830b/execroot/__main__/bazel-out/k8-fastbuild/testlogs
\ No newline at end of file
diff --git a/bazel-upstream b/bazel-upstream
new file mode 120000
index 0000000..ea0f8b5
--- /dev/null
+++ b/bazel-upstream
@@ -0,0 +1 @@
+/usr/local/google/home/shunhsingou/.cache/bazel/_bazel_shunhsingou/49565d7c865eb89d24e99f6508df830b/execroot/__main__
\ No newline at end of file
diff --git a/builddef.bzl b/builddef.bzl
new file mode 100644
index 0000000..ddb021d
--- /dev/null
+++ b/builddef.bzl
@@ -0,0 +1,15 @@
+def config(name, value):
+    native.genrule(
+        name = name,
+        srcs = [],
+        outs = [
+            "config/%s.hh" % name,
+        ],
+        cmd = """
+            echo "#define %s %s" >"$@"
+        """ % (name.upper(), value),
+    )
+
+def simobject(name, enums):
+    native.genrule(
+    )
diff --git a/ext/dnet/BUILD b/ext/dnet/BUILD
new file mode 100644
index 0000000..68543ba
--- /dev/null
+++ b/ext/dnet/BUILD
@@ -0,0 +1,10 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+    name = "dnet",
+    hdrs = ["os.h"],
+    copts = [
+        "-Iext",
+    ],
+    includes = ["."],
+)
diff --git a/ext/iostream3/BUILD b/ext/iostream3/BUILD
new file mode 100644
index 0000000..155fca3
--- /dev/null
+++ b/ext/iostream3/BUILD
@@ -0,0 +1,9 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+    name = "iostream3",
+    hdrs = [
+        "zfstream.h",
+    ],
+    includes = ["."],
+)
diff --git a/hello/BUILD b/hello/BUILD
new file mode 100644
index 0000000..08e322d
--- /dev/null
+++ b/hello/BUILD
@@ -0,0 +1,4 @@
+cc_binary(
+    name = "hello",
+    srcs = ["hello.cc"],
+)
diff --git a/hello/hello.cc b/hello/hello.cc
new file mode 100644
index 0000000..f59acf8
--- /dev/null
+++ b/hello/hello.cc
@@ -0,0 +1,6 @@
+#include <iostream>
+
+int main()
+{
+  std::cout << "Hello" << std::endl;
+}
diff --git a/src/base/BUILD b/src/base/BUILD
new file mode 100644
index 0000000..7f9c780
--- /dev/null
+++ b/src/base/BUILD
@@ -0,0 +1,96 @@
+cc_library(
+    name = "base",
+    srcs = [
+        "atomicio.cc",
+        "bitfield.cc",
+        "bmpwriter.cc",
+        "channel_addr.cc",
+        "debug.cc",
+        "fenv.cc",
+        "fiber.cc",
+        "framebuffer.cc",
+        "hostinfo.cc",
+        "imgwriter.cc",
+        "inet.cc",
+        "inifile.cc",
+        "logging.cc",
+        "match.cc",
+        "output.cc",
+        "pixel.cc",
+        "pngwriter.cc",
+        "pollevent.cc",
+        "random.cc",
+        "socket.cc",
+        "statistics.cc",
+        "str.cc",
+        "temperature.cc",
+        "time.cc",
+        "trace.cc",
+        "types.cc",
+        "version.cc",
+    ],
+    hdrs = glob(["*.hh"]),
+    copts = [
+        "-Isrc",
+        "-std=c++17",
+    ],
+    deps = [
+        "//:config",
+        "//ext/dnet",
+        "//ext/iostream3",
+        "//src/dev",
+        "//src/sim",
+    ],
+)
+
+# SourceLib('png', tags='png')
+#
+# Source('pngwriter.cc', tags='png')
+# Source('fiber.cc')
+# Source('framebuffer.cc')
+# Source('hostinfo.cc')
+# Source('inet.cc')
+# Source('inifile.cc', add_tags='gem5 serialize')
+# Source('logging.cc')
+# Source('match.cc', add_tags='gem5 trace')
+# Source('output.cc')
+# Source('pixel.cc')
+# Source('pollevent.cc')
+# Source('random.cc')
+# if env['CONF']['TARGET_ISA'] != 'null':
+#     Source('remote_gdb.cc')
+# Source('socket.cc')
+# Source('statistics.cc')
+# Source('str.cc', add_tags=['gem5 trace', 'gem5 serialize'])
+# Source('time.cc')
+# Source('version.cc')
+# Source('temperature.cc')
+# Source('trace.cc', add_tags='gem5 trace')
+# Source('types.cc')
+
+# DebugFlag('Annotate', "State machine annotation debugging")
+# DebugFlag('AnnotateQ', "State machine annotation queue debugging")
+# DebugFlag('AnnotateVerbose', "Dump all state machine annotation details")
+# DebugFlag('GDBAcc', "Remote debugger accesses")
+# DebugFlag('GDBExtra', "Dump extra information on reads and writes")
+# DebugFlag('GDBMisc', "Breakpoints, traps, watchpoints, etc.")
+# DebugFlag('GDBRead', "Reads to the remote address space")
+# DebugFlag('GDBRecv', "Messages received from the remote application")
+# DebugFlag('GDBSend', "Messages sent to the remote application")
+# DebugFlag('GDBWrite', "Writes to the remote address space")
+# DebugFlag('SQL', "SQL queries sent to the server")
+# DebugFlag('Stats', "Statistics management")
+# DebugFlag('StatEvents', "Statistics event tracking")
+#
+# CompoundFlag('GDBAll',
+#     [ 'GDBMisc', 'GDBAcc', 'GDBRead', 'GDBWrite', 'GDBSend', 'GDBRecv',
+#       'GDBExtra' ],
+#     desc="All Remote debugging flags")
+# CompoundFlag('AnnotateAll', ['Annotate', 'AnnotateQ', 'AnnotateVerbose'],
+#     desc="All Annotation flags")
+#
+# DebugFormatFlag('FmtFlag',
+#     "Show the --debug-flag that enabled each debug message")
+# DebugFormatFlag('FmtStackTrace',
+#     "Print a stack trace after every debug message")
+# DebugFormatFlag('FmtTicksOff', "Don't show tick count on debug messages")
diff --git a/src/dev/BUILD b/src/dev/BUILD
new file mode 100644
index 0000000..9f2e06c
--- /dev/null
+++ b/src/dev/BUILD
@@ -0,0 +1,8 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+    name = "dev",
+    hdrs = [
+        "net/etherpkt.hh",
+    ],
+)
diff --git a/src/sim/BUILD b/src/sim/BUILD
new file mode 100644
index 0000000..c2911db
--- /dev/null
+++ b/src/sim/BUILD
@@ -0,0 +1,6 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+    name = "sim",
+    hdrs = glob(["*.hh"]),
+)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58949
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I8013b4544b9922f35bcafbb383cc7f1b4d0c11e7
Gerrit-Change-Number: 58949
Gerrit-PatchSet: 1
Gerrit-Owner: Earl Ou <shunhsin...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to