ReGameDLL_CS/shared.gradle
Alibek Omarov 2b4eb6c137 GCC port and new defines for new ARM port (#294)
* Put SSE code under HAVE_SSE define

* Fix circular dependency on GCC 7.3

* Provide a way to disable AMXX related hacks, when it's not needed

* Fix ASM inline for GCC

* Fix compiling with MSVC

* Fix compiling with MSVC and ICC

* Check for HAVE_SSE in sse_mathfun.cpp after including precompiled, so SSE state will be determined

* Better check for SSE availability

* Missing call ::ClientCommand_
Make CSaveRestoreBuffer::m_Sizes as const
Cosmetic changes

* Gradle: Add GCC Toolchain

* GCC: Fix compile

* Gradle: Add -fno-devirtualize to compiler flags for GCC
2018-05-20 22:28:03 +07:00

50 lines
1.5 KiB
Groovy

import org.doomedsociety.gradlecpp.cfg.BinaryKind
import org.doomedsociety.gradlecpp.toolchain.icc.Icc
import org.gradle.nativeplatform.NativeBinarySpec
import org.gradle.nativeplatform.NativeExecutableBinarySpec
import org.gradle.nativeplatform.SharedLibraryBinarySpec
import org.gradle.nativeplatform.StaticLibraryBinarySpec
import org.gradle.nativeplatform.toolchain.VisualCpp
apply from: 'shared_msvc.gradle'
apply from: 'shared_icc.gradle'
apply from: 'shared_gcc.gradle'
rootProject.ext.createToolchainConfig = { NativeBinarySpec bin ->
BinaryKind binaryKind
if (bin instanceof NativeExecutableBinarySpec)
{
binaryKind = BinaryKind.EXECUTABLE
}
else if (bin instanceof SharedLibraryBinarySpec)
{
binaryKind = BinaryKind.SHARED_LIBRARY
}
else if (bin instanceof StaticLibraryBinarySpec)
{
binaryKind = BinaryKind.STATIC_LIBRARY
}
else
{
throw new RuntimeException("Unknown executable kind ${bin.class.name}")
}
boolean releaseBuild = bin.buildType.name.toLowerCase() == 'release'
if (bin.toolChain instanceof VisualCpp)
{
return rootProject.createMsvcConfig(releaseBuild, binaryKind)
}
else if (bin.toolChain instanceof Icc)
{
return rootProject.createIccConfig(releaseBuild, binaryKind)
}
else if (bin.toolChain instanceof Gcc)
{
return rootProject.createGccConfig(releaseBuild, binaryKind)
}
else
{
throw new RuntimeException("Unknown native toolchain: ${bin.toolChain.class.name}")
}
}