mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-05 18:24:06 +00:00
add support for linux_riscv64 and freestanding_riscv64
This commit is contained in:
@@ -3245,6 +3245,15 @@ int main(int arg_count, char const **arg_ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE(laytan): on riscv64 we want to enforce some features.
|
||||
if (build_context.metrics.arch == TargetArch_riscv64) {
|
||||
String disabled;
|
||||
if (!check_target_feature_is_enabled(str_lit("64bit,f,d,m"), &disabled)) { // 64bit, floats, doubles, integer multiplication.
|
||||
gb_printf_err("missing required target feature: \"%.*s\", enable it by setting a different -microarch or explicitly adding it through -target-features\n", LIT(disabled));
|
||||
gb_exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (build_context.show_debug_messages) {
|
||||
debugf("Selected microarch: %.*s\n", LIT(march));
|
||||
debugf("Default microarch features: %.*s\n", LIT(default_features));
|
||||
|
||||
Reference in New Issue
Block a user