Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added module for abi constraint values #39

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ filegroup(
srcs = [
"BUILD",
"WORKSPACE",
"//abi:srcs",
"//cpu:srcs",
"//os:srcs",
],
Expand Down
134 changes: 134 additions & 0 deletions abi/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Standard constraint_setting and constraint_values to be used in platforms.
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

# To add a new constraint_value see https://github.com/bazelbuild/platforms.
constraint_setting(name = "abi")

constraint_value(
name = "atmega328",
constraint_setting = ":abi",
)

constraint_value(
name = "eabi",
constraint_setting = ":abi",
)

constraint_value(
name = "eabihf",
constraint_setting = ":abi",
)

constraint_value(
name = "elf",
constraint_setting = ":abi",
)

constraint_value(
name = "gnu",
constraint_setting = ":abi",
)

constraint_value(
name = "gnu_ilp32",
constraint_setting = ":abi",
)

constraint_value(
name = "gnueabi",
constraint_setting = ":abi",
)

constraint_value(
name = "gnuabi64",
UebelAndre marked this conversation as resolved.
Show resolved Hide resolved
constraint_setting = ":abi",
)

constraint_value(
name = "gnueabihf",
constraint_setting = ":abi",
)

constraint_value(
name = "gnuspe",
constraint_setting = ":abi",
)

constraint_value(
name = "gnux32",
constraint_setting = ":abi",
)

constraint_value(
name = "linuxkernel",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like it belongs? Kernel code can be built with various other options from this list, there's nothing particularly special about object files built for the kernel.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. This was just a value listed in https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 so it was included in what I added. As per most of my comments on this PR, I'm happy to remove this and have a more focused conversation on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think using Rust, or Go, or linux kernel builds, or whatever as the pattern to emulate wins.

Was there a design proposal for this? It is much easier to discuss in a doc than in PR review.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from this there's just the github issue (#38). I tried emailing //[email protected] per the README but the address no longer seems valid.

constraint_setting = ":abi",
)

constraint_value(
name = "macabi",
constraint_setting = ":abi",
)

constraint_value(
name = "msvc",
constraint_setting = ":abi",
)

constraint_value(
name = "musl",
constraint_setting = ":abi",
)

constraint_value(
name = "muslabi64",
constraint_setting = ":abi",
)

constraint_value(
name = "musleabi",
constraint_setting = ":abi",
)

constraint_value(
name = "musleabihf",
constraint_setting = ":abi",
)

constraint_value(
name = "sgx",
constraint_setting = ":abi",
)

constraint_value(
name = "sim",
constraint_setting = ":abi",
)

constraint_value(
name = "softfloat",
constraint_setting = ":abi",
)

constraint_value(
name = "uclibc",
constraint_setting = ":abi",
)

constraint_value(
name = "uclibceabi",
constraint_setting = ":abi",
)

constraint_value(
name = "uclibceabihf",
constraint_setting = ":abi",
)