diff --git a/.buck/prelude b/.buck/prelude new file mode 160000 index 0000000..e6ee460 --- /dev/null +++ b/.buck/prelude @@ -0,0 +1 @@ +Subproject commit e6ee46050e74f339433eaecb127bf1dde2cb3426 diff --git a/.buck/shim/BUCK b/.buck/shim/BUCK new file mode 100644 index 0000000..02908f0 --- /dev/null +++ b/.buck/shim/BUCK @@ -0,0 +1,3 @@ +load("@prelude//toolchains:demo.bzl", "system_demo_toolchains") + +system_demo_toolchains() diff --git a/.buck/shim/README.md b/.buck/shim/README.md new file mode 100644 index 0000000..70016c3 --- /dev/null +++ b/.buck/shim/README.md @@ -0,0 +1,3 @@ +# Open Source Shim + +These files are a shim that allow us to build Object Introspection with Buck2 outside Meta in the open source world. diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 0000000..ac88d2e --- /dev/null +++ b/.buckconfig @@ -0,0 +1,17 @@ +[repositories] +root = . +prelude = .buck/prelude +shim = .buck/shim + +[repository_aliases] +config = prelude +ovr_config = prelude +toolchains = shim +fbcode = shim +fbcode_macros = shim +fbsource = shim +buck = shim + +[parser] +target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default + diff --git a/.gitignore b/.gitignore index 491c05e..e205e3b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,9 @@ PADDING failed website/node_modules +## Buck +buck-out/ + ## Vim *.swp *.swo diff --git a/.gitmodules b/.gitmodules index 5611e66..577d278 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "extern/drgn"] path = extern/drgn url = https://github.com/JakeHillion/drgn.git +[submodule ".buck/buck2-prelude"] + path = .buck/prelude + url = https://github.com/facebook/buck2-prelude diff --git a/BUCK b/BUCK new file mode 100644 index 0000000..979e82c --- /dev/null +++ b/BUCK @@ -0,0 +1,6 @@ +load("@fbcode_macros//build_defs:native_rules.bzl", "alias") + +alias( + name = "oid", + actual = "//oi:oid", +) diff --git a/oi/BUCK b/oi/BUCK new file mode 100644 index 0000000..2d67bcc --- /dev/null +++ b/oi/BUCK @@ -0,0 +1,13 @@ +cxx_binary( + name = "oid", + srcs = [ + "OID.cpp", + "OIDebugger.cpp", + ], + headers = [ + "OIDebugger.h", + "Syscall.h", + "TrapInfo.h", + ], +) +