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

Add support for UEFI targets and OS #2142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
7 changes: 7 additions & 0 deletions rust/platform/triple_mappings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SUPPORTED_T2_PLATFORM_TRIPLES = [
"aarch64-fuchsia",
"aarch64-linux-android",
"aarch64-pc-windows-msvc",
"aarch64-unknown-uefi",
"arm-unknown-linux-gnueabi",
"armv7-linux-androideabi",
"armv7-unknown-linux-gnueabi",
Expand All @@ -45,6 +46,7 @@ SUPPORTED_T2_PLATFORM_TRIPLES = [
"x86_64-linux-android",
"x86_64-unknown-freebsd",
"x86_64-unknown-none",
"x86_64-unknown-uefi",
]

SUPPORTED_PLATFORM_TRIPLES = SUPPORTED_T1_PLATFORM_TRIPLES + SUPPORTED_T2_PLATFORM_TRIPLES
Expand Down Expand Up @@ -97,6 +99,7 @@ _SYSTEM_TO_BUILTIN_SYS_SUFFIX = {
"none": "none",
"openbsd": "openbsd",
"solaris": None,
"uefi": "uefi",
"unknown": None,
"wasi": None,
"windows": "windows",
Expand All @@ -113,6 +116,7 @@ _SYSTEM_TO_BINARY_EXT = {
"ios": "",
"linux": "",
"none": "",
"uefi": ".efi",
# This is currently a hack allowing us to have the proper
# generated extension for the wasm target, similarly to the
# windows target
Expand All @@ -132,6 +136,7 @@ _SYSTEM_TO_STATICLIB_EXT = {
"ios": ".a",
"linux": ".a",
"none": ".a",
"uefi": ".lib",
"unknown": "",
"wasi": "",
"windows": ".lib",
Expand All @@ -148,6 +153,7 @@ _SYSTEM_TO_DYLIB_EXT = {
"ios": ".dylib",
"linux": ".so",
"none": ".so",
"uefi": "", # UEFI doesn't have dynamic linking
"unknown": ".wasm",
"wasi": ".wasm",
"windows": ".dll",
Expand Down Expand Up @@ -191,6 +197,7 @@ _SYSTEM_TO_STDLIB_LINKFLAGS = {
"none": [],
"openbsd": ["-lpthread"],
"solaris": ["-lsocket", "-lposix4", "-lpthread", "-lresolv"],
"uefi": [],
"unknown": [],
"uwp": ["ws2_32.lib"],
"wasi": [],
Expand Down
Loading