Merge pull request #33 from devnexen/clang_build

Make the build more clang friendly
This commit is contained in:
Amy Ackermann
2018-07-30 09:16:33 -07:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -593,7 +593,7 @@ BEGIN_AS_NAMESPACE
template<typename T>
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+
// C++11 compliant code
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
endif
ifndef NLTO
ifeq (,$(findstring g++, $(CC)))
CXXFLAGS += -flto=6
else
CXXFLAGS += -flto=thin
endif
else
CXXFLAGS += -fno-lto
endif