Make the build more clang friendly

This commit is contained in:
David Carlier
2018-07-30 16:50:07 +01:00
parent b6d879d510
commit 166ca857fd
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -593,7 +593,7 @@ BEGIN_AS_NAMESPACE
template<typename T> template<typename T>
asUINT asGetTypeTraits() asUINT asGetTypeTraits()
{ {
#if defined(_MSC_VER) || defined(_LIBCPP_TYPE_TRAITS) || (__GNUC__ >= 5) #if defined(_MSC_VER) || defined(_LIBCPP_TYPE_TRAITS) || (__GNUC__ >= 5) || defined(__clang__)
// MSVC, XCode/Clang, and gnuc 5+ // MSVC, XCode/Clang, and gnuc 5+
// C++11 compliant code // C++11 compliant code
bool hasConstructor = std::is_default_constructible<T>::value && !std::is_trivially_default_constructible<T>::value; bool hasConstructor = std::is_default_constructible<T>::value && !std::is_trivially_default_constructible<T>::value;
+4
View File
@@ -35,7 +35,11 @@ else
CXXFLAGS += -DNDEBUG CXXFLAGS += -DNDEBUG
endif endif
ifndef NLTO ifndef NLTO
ifeq (,$(findstring g++, $(CC)))
CXXFLAGS += -flto=6 CXXFLAGS += -flto=6
else
CXXFLAGS += -flto=thin
endif
else else
CXXFLAGS += -fno-lto CXXFLAGS += -fno-lto
endif endif