Rebasing previous change 301607 from tizen.riscv
Change-Id: I411fa84ced46e5220c59e7b43e3bd7a840044dde
Signed-off-by: Leonid <l.sawin@samsung.com>
#if BUILDFLAG(IS_TIZEN)
#include <system_info.h>
#if BUILDFLAG(IS_TIZEN)
#include <system_info.h>
+#if defined(ARCH_CPU_RISCV_FAMILY)
+#include <cstring>
+#define PROFILE_ENV_STRING "CHROMIUM_PROFILE"
+#endif
#if BUILDFLAG(IS_TIZEN)
char *profileName;
system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
#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;
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;
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, "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;
}
else {
g_arch__ = ARCH_UNKNOWN;
}
ARCH_ARMV7 = 1 << 2,
ARCH_AARCH64 = 1 << 3,
ARCH_X86 = 1 << 4,
ARCH_ARMV7 = 1 << 2,
ARCH_AARCH64 = 1 << 3,
ARCH_X86 = 1 << 4,
+ ARCH_X86_64 = 1 << 5,
+ ARCH_RV32 = 1 << 6,
+ ARCH_RV64 = 1 << 7,
} Arch_Inform;
#ifdef __cplusplus
} Arch_Inform;
#ifdef __cplusplus