#if BUILDFLAG(IS_TIZEN)
#include <system_info.h>
+#if defined(ARCH_CPU_RISCV_FAMILY)
+#include <cstring>
+#define PROFILE_ENV_STRING "CHROMIUM_PROFILE"
+#endif
#endif
#if BUILDFLAG(IS_TIZEN)
char *profileName;
system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+#if defined(ARCH_CPU_RISCV_FAMILY)
+ if (const char* env_profile = std::getenv(PROFILE_ENV_STRING))
+ {
+ free(profileName);
+ profileName = strdup(env_profile);
+ }
+#endif
switch (*profileName) {
case 'm':
case 'M':
g_profile__ = PROFILE_MOBILE;
break;
+ case 'd':
+ case 'D':
+ g_profile__ = PROFILE_DESKTOP;
+ break;
case 'w':
case 'W':
g_profile__ = PROFILE_WEARABLE;
else if (strncmp(archName, "x86_64", archNamelen) == 0) {
g_arch__ = ARCH_X86_64;
}
+ else if (strncmp(archName, "rv32", archNamelen) == 0) {
+ g_arch__ = ARCH_RV32;
+ }
+ else if (strncmp(archName, "rv64", archNamelen) == 0) {
+ g_arch__ = ARCH_RV64;
+ }
else {
g_arch__ = ARCH_UNKNOWN;
}