Skip to content

Commit

Permalink
Rename musl-toolchain cell to rules_musl. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
zadlg authored Mar 10, 2024
1 parent fd17808 commit 21f951b
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 189 deletions.
4 changes: 2 additions & 2 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[repositories]
root = .
musl-toolchain = .
rules_musl = .
prelude = prelude
toolchains = toolchains
none = none
Expand All @@ -15,4 +15,4 @@ buck = none

[parser]
target_platform_detector_spec = target:root//...->prelude//platforms:default
target_platform_detector_spec = target:musl-toolchain//...->prelude//platforms:default
target_platform_detector_spec = target:rules_musl//...->prelude//platforms:default
10 changes: 5 additions & 5 deletions docs/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ buck2 docs starlark \
--format markdown_files \
--markdown-files-starlark-subdir "" \
--markdown-files-destination-dir "${PWD}/docs/" \
-- @musl-toolchain//musl-toolchain:rules.bzl \
@musl-toolchain//musl-toolchain/archive:rules.bzl \
@musl-toolchain//musl-toolchain:providers.bzl \
@musl-toolchain//musl-toolchain:define_toolchain.bzl \
@musl-toolchain//musl-toolchain:types.bzl
-- @rules_musl//musl:rules.bzl \
@rules_musl//musl/archive:rules.bzl \
@rules_musl//musl:providers.bzl \
@rules_musl//musl:define_toolchain.bzl \
@rules_musl//musl:types.bzl

if ! [ "$1" = "generate" ]; then
if [ -d ".git" ]; then
Expand Down
163 changes: 0 additions & 163 deletions docs/musl-toolchain/musl-toolchain/archive.bzl.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions musl-toolchain/archive/rules.bzl → musl/archive/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@musl-toolchain//musl-toolchain:providers.bzl", "ArchiveInfo", "ArchiveToolchainInfo")
load("@musl-toolchain//musl-toolchain:types.bzl", "Architecture", "Archive", "ArchiveManifest", "Mode", "Platform")
load("@musl-toolchain//musl-toolchain:rules.bzl", "manifest_from_flat_dict", "manifest_get_default", "manifest_to_flat_dict")
load("@rules_musl//musl:providers.bzl", "ArchiveInfo", "ArchiveToolchainInfo")
load("@rules_musl//musl:types.bzl", "Architecture", "Archive", "ArchiveManifest", "Mode", "Platform")
load("@rules_musl//musl:rules.bzl", "manifest_from_flat_dict", "manifest_get_default", "manifest_to_flat_dict")

# Prefix in the archive.
_ARCHIVE_PREFIX_FORMAT = "{arch}-{platform}-musl-{mode}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@musl-toolchain//musl-toolchain/archive:rules.bzl", "new_archive")
load("@musl-toolchain//musl-toolchain:types.bzl", "Architecture", "Mode", "Platform")
load("@musl-toolchain//musl-toolchain:define_toolchain.bzl", "define_cxx_toolchain")
load("@musl-toolchain//musl-toolchain:all_archives.bzl", "X86_64_LINUX_NATIVE")
load("@rules_musl//musl/archive:rules.bzl", "new_archive")
load("@rules_musl//musl:types.bzl", "Architecture", "Mode", "Platform")
load("@rules_musl//musl:define_toolchain.bzl", "define_cxx_toolchain")
load("@rules_musl//musl:all_archives.bzl", "X86_64_LINUX_NATIVE")

new_archive(
name = "x86_64-linux-native",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions musl-toolchain/providers.bzl → musl/providers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@musl-toolchain//musl-toolchain/providers:archive_info.bzl", "ArchiveInfo")
load("@musl-toolchain//musl-toolchain/providers:archive_toolchain_info.bzl", "ArchiveToolchainInfo")
load("@rules_musl//musl/providers:archive_info.bzl", "ArchiveInfo")
load("@rules_musl//musl/providers:archive_toolchain_info.bzl", "ArchiveToolchainInfo")

load_symbols({
"ArchiveInfo": ArchiveInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@musl-toolchain//musl-toolchain/types:archive.bzl", "Archive")
load("@rules_musl//musl/types:archive.bzl", "Archive")

ArchiveInfo = provider(
doc = "Info about an archive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@musl-toolchain//musl-toolchain/types:archive.bzl", "Archive")
load("@rules_musl//musl/types:archive.bzl", "Archive")

ArchiveToolchainInfo = provider(
doc = "Toolchain related info from an archive",
Expand Down
2 changes: 1 addition & 1 deletion musl-toolchain/rules.bzl → musl/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

load(
"@musl-toolchain//musl-toolchain/types:manifest.bzl",
"@rules_musl//musl/types:manifest.bzl",
manifest_from_flat_dict = "from_flat_dict",
manifest_get_default = "default",
manifest_to_flat_dict = "to_flat_dict",
Expand Down
10 changes: 5 additions & 5 deletions musl-toolchain/types.bzl → musl/types.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@musl-toolchain//musl-toolchain/types:architecture.bzl", "Architecture")
load("@musl-toolchain//musl-toolchain/types:archive.bzl", "Archive")
load("@musl-toolchain//musl-toolchain/types:manifest.bzl", "ArchiveManifest", "ArchiveManifestLibraries", "ArchiveManifestTools")
load("@musl-toolchain//musl-toolchain/types:mode.bzl", "Mode")
load("@musl-toolchain//musl-toolchain/types:platform.bzl", "Platform")
load("@rules_musl//musl/types:architecture.bzl", "Architecture")
load("@rules_musl//musl/types:archive.bzl", "Archive")
load("@rules_musl//musl/types:manifest.bzl", "ArchiveManifest", "ArchiveManifestLibraries", "ArchiveManifestTools")
load("@rules_musl//musl/types:mode.bzl", "Mode")
load("@rules_musl//musl/types:platform.bzl", "Platform")

load_symbols({
"Architecture": Architecture,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions toolchains/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")
load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain")
load("@musl-toolchain//musl-toolchain:define_toolchain.bzl", "define_cxx_toolchain")
load("@rules_musl//musl:define_toolchain.bzl", "define_cxx_toolchain")

system_python_bootstrap_toolchain(
name = "python_bootstrap",
Expand All @@ -14,6 +14,6 @@ system_genrule_toolchain(

define_cxx_toolchain(
name = "cxx",
archive = "@musl-toolchain//musl-toolchain/default-toolchains:x86_64-linux-native",
archive = "@rules_musl//musl/default-toolchains:x86_64-linux-native",
visibility = ["PUBLIC"],
)

0 comments on commit 21f951b

Please sign in to comment.