launcher: use -mcpu=baseline
This log message has been seen in a Github Actions worker:
running <...>/c++ failed: signal: illegal instruction (core dumped)
I conclude that the launcher was compiled on a newer CPU than used on
the worker at the time.
Reported-by: mp@edgeless.systems
Fixes #22
This commit is contained in:
@@ -38,6 +38,14 @@ _HOST_PLATFORM_EXT = {
|
||||
"windows-x86_64": "zip",
|
||||
}
|
||||
|
||||
_MCPU = {
|
||||
"linux-aarch64": "baseline",
|
||||
"linux-x86_64": "baseline",
|
||||
"macos-aarch64": "apple_a14",
|
||||
"macos-x86_64": "baseline",
|
||||
"windows-x86_64": "baseline",
|
||||
}
|
||||
|
||||
_compile_failed = """
|
||||
Compilation of launcher.zig failed:
|
||||
command={compile_cmd}
|
||||
@@ -164,6 +172,7 @@ def _zig_repository_impl(repository_ctx):
|
||||
compile_cmd = [
|
||||
_paths_join("..", "zig"),
|
||||
"build-exe",
|
||||
"-mcpu={}".format(_MCPU[host_platform]),
|
||||
"-OReleaseSafe",
|
||||
"launcher.zig",
|
||||
] + (["-static"] if os == "linux" else [])
|
||||
|
||||
Reference in New Issue
Block a user