diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-08-22 11:20:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-22 11:20:03 +0100 |
| commit | 70932dc47882b17344d466776ad988ffb3c7bc98 (patch) | |
| tree | 2e854e0f3f6f3c5494a172211af834c9a1db0822 /src/main.cpp | |
| parent | a8bc6f08a9b4dea769b4aea40aa33e72c0b7806a (diff) | |
| parent | c0125f3192a453195cad108bf8155c64be78f197 (diff) | |
Merge pull request #4089 from laytan/riscv64
add support for linux_riscv64 and freestanding_riscv64
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 77758b929..5131bdc21 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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)); |