forked from SEAME-pt/SEAME-Course-24-25
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use gcc to cross-compilation for aarch64, as clang requires additional setup. Clang support can be added on a follow-up.
- Loading branch information
1 parent
d451dbe
commit f90f2fb
Showing
10 changed files
with
430 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
filegroup( | ||
name = "clang_tidy_config", | ||
srcs = [ | ||
".clang-tidy", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
config_setting( | ||
name = "x86_64_config", | ||
constraint_values = [ | ||
"@platforms//cpu:x86_64", | ||
"@platforms//os:linux", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
config_setting( | ||
name = "aarch64_config", | ||
constraint_values = [ | ||
"@platforms//cpu:aarch64", | ||
"@platforms//os:linux", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
platform( | ||
name = "x86_64_linux", | ||
constraint_values = [ | ||
"@platforms//cpu:x86_64", | ||
"@platforms//os:linux", | ||
], | ||
) | ||
|
||
platform( | ||
name = "aarch64_linux", | ||
constraint_values = [ | ||
"@platforms//cpu:aarch64", | ||
"@platforms//os:linux", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +0,0 @@ | ||
load(":cc_toolchain_config.bzl", "cc_toolchain_config") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup(name = "empty") | ||
|
||
cc_toolchain_config(name = "linux_x86_64_toolchain_config") | ||
|
||
cc_toolchain( | ||
name = "linux_x86_64_toolchain", | ||
all_files = ":empty", | ||
compiler_files = ":empty", | ||
dwp_files = ":empty", | ||
linker_files = ":empty", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 0, | ||
toolchain_config = ":linux_x86_64_toolchain_config", | ||
toolchain_identifier = "linux_x86_64_toolchain", | ||
) | ||
|
||
toolchain( | ||
name = "cc_toolchain_for_linux_x86_64", | ||
exec_compatible_with = [ | ||
"@platforms//cpu:x86_64", | ||
"@platforms//os:linux", | ||
], | ||
target_compatible_with = [ | ||
"@platforms//cpu:x86_64", | ||
"@platforms//os:linux", | ||
], | ||
toolchain = ":linux_x86_64_toolchain", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
load("//toolchain/aarch64_linux:cc_toolchain_config.bzl", "cc_toolchain_config") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
filegroup(name = "empty") | ||
|
||
cc_toolchain_config(name = "toolchain_config") | ||
|
||
cc_toolchain( | ||
name = "cc_toolchain", | ||
all_files = ":empty", | ||
compiler_files = ":empty", | ||
dwp_files = ":empty", | ||
linker_files = ":empty", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 0, | ||
toolchain_config = ":toolchain_config", | ||
toolchain_identifier = "aarch64_linux_toolchain", | ||
) | ||
|
||
toolchain( | ||
name = "aarch64_linux", | ||
exec_compatible_with = [ | ||
"@platforms//cpu:x86_64", | ||
"@platforms//os:linux", | ||
], | ||
target_compatible_with = [ | ||
"@platforms//cpu:aarch64", | ||
"@platforms//os:linux", | ||
], | ||
toolchain = "cc_toolchain", | ||
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", | ||
) |
Oops, something went wrong.