Skip to content

Commit

Permalink
Buck2 cleanups (#66)
Browse files Browse the repository at this point in the history
* add missing new lines

* Rename move contents of toolchain dir to toolchains dir

* add buck-out to .gitignore

* reinstantiate prelude module

* fix pyre
  • Loading branch information
michalgr authored Oct 13, 2023
1 parent 5d87f3b commit 0d7d261
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ target_platform_detector_spec = target:root//...->prelude//platforms:default

[project]
ignore = .git

[build]
execution_platforms = prelude//platforms:default
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# build files
/build/
/out/
/buck-out/

# sources
/projects/*/sources
Expand All @@ -16,6 +17,9 @@
.vagrant/
ubuntu-bionic-18.04-cloudimg-console.log

# pyre
.pyre/

bpftools-arm64.tar.gz
bpftools-min-arm64.tar.gz
bpftools-x86_64.tar.gz
Expand Down
7 changes: 7 additions & 0 deletions .pyre_configuration
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"use_buck2": true,
"bxl_builder": "prelude//python/sourcedb/classic.bxl:build",
"targets": [
"root//projects/jdwp/..."
]
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export PATH:=$(abspath $(HOST_OUT_DIR)/bin):$(PATH)
all:
@echo "Choose a project to build"

include toolchain/toolchain.mk
include toolchains/toolchains.mk

$(ANDROID_BUILD_DIR) $(HOST_BUILD_DIR) $(DOWNLOADS_DIR) $(ANDROID_SYSROOTS_OUT_DIR):
mkdir -p $@
Expand Down
1 change: 1 addition & 0 deletions prelude
Submodule prelude added at 81d87a
5 changes: 0 additions & 5 deletions projects/jdwp/.pyre_configuration

This file was deleted.

2 changes: 1 addition & 1 deletion projects/jdwp/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ python_library(
name = "lib",
srcs = [],
visibility = ["PUBLIC"],
)
)
2 changes: 1 addition & 1 deletion projects/jdwp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ def main():
return None

if __name__ == "__main__":
main()
main()
2 changes: 1 addition & 1 deletion toolchains/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ system_python_toolchain(
system_python_bootstrap_toolchain(
name = "python_bootstrap",
visibility = ["PUBLIC"],
)
)
4 changes: 2 additions & 2 deletions toolchain/autotools.mk → toolchains/autotools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ HOST_CONFIG_SITE = $(HOST_OUT_DIR)/share/config.site
HOST_EXTRA_CONFIGURE_FLAGS = --prefix=$(abspath $(HOST_OUT_DIR))

$(ANDROID_CONFIG_SITE): | $(ANDROID_OUT_DIR)
cp toolchain/config.site.template $@
cp toolchains/config.site.template $@
@sed -ibkp -e "s+<BIN_PATH>+$(abspath $(ANDROID_TOOLCHAIN_PATH))+g" $@
@sed -ibkp -e "s+<TRIPLE>+$(ANDROID_TRIPLE)+g" $@
@sed -ibkp -e "s+<SITE_PATH>+$(abspath $(ANDROID_OUT_DIR))+g" $@
@sed -ibkp -e "s+<API>+$(NDK_API)+g" $@

$(HOST_CONFIG_SITE): | $(HOST_OUT_DIR)
cp toolchain/config.site.host.template $@
cp toolchains/config.site.host.template $@
@sed -ibkp -e "s+<SITE_PATH>+$(abspath $(HOST_OUT_DIR))+g" $@
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions toolchain/toolchain.mk → toolchains/toolchains.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ANDROID_TOOLCHAIN_PATH = \
$(abspath $(NDK_PATH)/toolchains/llvm/prebuilt/linux-x86_64/bin)
ANDROID_TOOLCHAIN_STRIP_PATH = $(ANDROID_TOOLCHAIN_PATH)/llvm-strip

include toolchain/autotools.mk
include toolchain/cmake.mk
include toolchains/autotools.mk
include toolchains/cmake.mk

ifeq ($(NDK_ARCH), arm64)
ANDROID_SYSROOT_LIB_SUBDIR = aarch64-linux-android
Expand Down

0 comments on commit 0d7d261

Please sign in to comment.