Enable compilation on ChromeOS

This commit is contained in:
2024-08-17 00:27:25 +02:00
parent 4ad4091b38
commit db34f15177
6 changed files with 22 additions and 8 deletions

View File

@ -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

View File

@ -13,4 +13,3 @@ platform(
"@bazel_tools//tools/cpp:clang-cl", "@bazel_tools//tools/cpp:clang-cl",
], ],
) )

View File

@ -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",
) )

View File

@ -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;

View File

@ -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

1
todo.txt Normal file
View File

@ -0,0 +1 @@
Platform config