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

[Android] RISCV64 Support Based on Clang 12 #1

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ config("extra_warnings") {
"-Wtautological-type-limit-compare",
"-Wundefined-reinterpret-cast",
"-Wunneeded-internal-declaration",
"-Wunused-but-set-variable",
# "-Wunused-but-set-variable",
"-Wsuggest-destructor-override",
"-Wsuggest-override",

Expand Down
2 changes: 1 addition & 1 deletion gni/angle.gni
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ declare_args() {

if (current_cpu == "arm64" || current_cpu == "x64" ||
current_cpu == "mips64el" || current_cpu == "s390x" ||
current_cpu == "ppc64" || current_cpu == "loong64") {
current_cpu == "ppc64" || current_cpu == "loong64" || current_cpu == "riscv64") {
angle_64bit_current_cpu = true
} else if (current_cpu == "arm" || current_cpu == "x86" ||
current_cpu == "mipsel" || current_cpu == "s390" ||
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/preprocessor/preprocessor_tab_autogen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wunreachable-code"
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
// # pragma clang diagnostic ignored "-Wunused-but-set-variable"
#endif

#include "ExpressionParser.h"
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/translator/glslang_tab_autogen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wunreachable-code"
# pragma clang diagnostic ignored "-Wunused-but-set-variable"
// # pragma clang diagnostic ignored "-Wunused-but-set-variable"
#endif

#include "GLSLANG/ShaderLang.h"
Expand Down
7 changes: 7 additions & 0 deletions src/libGLESv2/global_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ constexpr size_t kAndroidOpenGLTlsSlot = 3;
__asm__("mov %%fs:0, %0" : "=r"(__val)); \
__val; \
})
# elif (defined(__riscv) && (__riscv_xlen == 64))
# define ANGLE_ANDROID_GET_GL_TLS() \
({ \
void** __val; \
__asm__("mv %0, tp" : "=r"(__val)); \
__val; \
})
# else
# error unsupported architecture
# endif
Expand Down
2 changes: 1 addition & 1 deletion src/third_party/libXNVCtrl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config("libXNVCtrl_config") {
# XextAddDisplay which will cause a failure.
cflags = [
"-Wno-incompatible-pointer-types-discards-qualifiers",
"-Wno-deprecated-non-prototype",
#"-Wno-deprecated-non-prototype",
]
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/astc-encoder/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ source_set("astcenc") {
}

if (is_clang) {
cflags_cc = [ "-Wno-unused-but-set-variable" ]
#cflags_cc = [ "-Wno-unused-but-set-variable" ]
}
}