Skip to content

Commit

Permalink
Merge branch 'main' into configure_in_place
Browse files Browse the repository at this point in the history
  • Loading branch information
jsharpe authored Mar 31, 2021
2 parents 143e522 + 5686d0f commit 2397c10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions foreign_cc/built_tools/ninja_build.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ load(
"FOREIGN_CC_BUILT_TOOLS_HOST_FRAGMENTS",
"built_tool_rule_impl",
)
load("//foreign_cc/private:shell_script_helper.bzl", "os_name")

def _ninja_tool_impl(ctx):
script = [
"./configure.py --bootstrap",
# TODO: Reduce unnecessary copys and only keep what's required
"##copy_dir_contents_to_dir## $$BUILD_TMPDIR$$ $$INSTALLDIR$$",
"mkdir $$INSTALLDIR$$/bin",
"cp ./ninja{} $$INSTALLDIR$$/bin/".format(
".exe" if "win" in os_name(ctx) else "",
),
]

return built_tool_rule_impl(
Expand Down
4 changes: 2 additions & 2 deletions toolchains/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ ninja_tool(
native_tool_toolchain(
name = "built_ninja",
path = select({
"@platforms//os:windows": "$(execpath :ninja_tool)/ninja.exe",
"//conditions:default": "$(execpath :ninja_tool)/ninja",
"@platforms//os:windows": "$(execpath :ninja_tool)/bin/ninja.exe",
"//conditions:default": "$(execpath :ninja_tool)/bin/ninja",
}),
target = ":ninja_tool",
)
Expand Down

0 comments on commit 2397c10

Please sign in to comment.