Make the build more clang friendly
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user