Enable compilation on ChromeOS
This commit is contained in:
6
.bazelrc
6
.bazelrc
@ -1,4 +1,8 @@
|
|||||||
build --cxxopt=-Xclang=-std=c++20
|
build:linux --repo_env=CC=clang
|
||||||
|
|
||||||
|
build:windows --cxxopt=-Xclang=-std=c++20
|
||||||
|
build:linux --cxxopt=-std=c++20
|
||||||
|
|
||||||
build --cxxopt=-Wall
|
build --cxxopt=-Wall
|
||||||
build --cxxopt=-Wno-c++98-compat
|
build --cxxopt=-Wno-c++98-compat
|
||||||
build --cxxopt=-Wno-c++98-compat-pedantic
|
build --cxxopt=-Wno-c++98-compat-pedantic
|
||||||
|
@ -13,4 +13,3 @@ platform(
|
|||||||
"@bazel_tools//tools/cpp:clang-cl",
|
"@bazel_tools//tools/cpp:clang-cl",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ git_override(
|
|||||||
)
|
)
|
||||||
|
|
||||||
register_execution_platforms(
|
register_execution_platforms(
|
||||||
"//:x64_windows-clang-cl"
|
# "//:x64_windows-clang-cl",
|
||||||
)
|
)
|
||||||
|
|
||||||
register_toolchains(
|
register_toolchains(
|
||||||
"@@local_config_cc//:cc-toolchain-x64_windows-clang-cl",
|
# "@@local_config_cc//:cc-toolchain-x64_windows-clang-cl",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -85,9 +85,9 @@ template<typename T> concept is_integral = __is_integral(T);
|
|||||||
template<typename T> concept is_floating_point = __is_floating_point(T);
|
template<typename T> concept is_floating_point = __is_floating_point(T);
|
||||||
template<typename T> concept is_arithmetic = is_integral<T> || is_floating_point<T>;
|
template<typename T> concept is_arithmetic = is_integral<T> || is_floating_point<T>;
|
||||||
|
|
||||||
template<typename T> struct _is_array_helper : false_type {};
|
template<typename T> struct _is_array_helper : false_type {};
|
||||||
template<typename T> struct _is_array_helper<T[]> : true_type {};
|
template<typename T> struct _is_array_helper<T[]> : true_type {};
|
||||||
template<typename T, size_t N> struct _is_array_helper<T[N]> : true_type {};
|
template<typename T, int N> struct _is_array_helper<T[N]> : true_type {};
|
||||||
|
|
||||||
template<typename T> concept is_array = _is_array_helper<T>::value;
|
template<typename T> concept is_array = _is_array_helper<T>::value;
|
||||||
|
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define ASL_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
|
#ifdef _MSVC_VER_
|
||||||
|
#elif defined(__clang_version__)
|
||||||
|
#else
|
||||||
|
#error Not a valid environment
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSVC_VER_
|
||||||
|
#define ASL_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
|
||||||
|
#else
|
||||||
|
#define ASL_NO_UNIQUE_ADDRESS [[no_unique_address]]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user