mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-27 05:51:10 +03:00
Enable useGcc gradle option for dedicated project.
This commit is contained in:
parent
fd8e550f0d
commit
3fb1bcaaba
@ -37,11 +37,12 @@ void setupToolchain(NativeBinarySpec b) {
|
|||||||
cfg.extraLibs "ws2_32.lib", "winmm.lib", "user32.lib", "advapi32.lib", "shell32.lib"
|
cfg.extraLibs "ws2_32.lib", "winmm.lib", "user32.lib", "advapi32.lib", "shell32.lib"
|
||||||
}
|
}
|
||||||
else if (cfg instanceof GccToolchainConfig) {
|
else if (cfg instanceof GccToolchainConfig) {
|
||||||
cfg.compilerOptions.pchConfig = new GccToolchainConfig.PrecompilerHeaderOptions(
|
if (!useGcc) {
|
||||||
enabled: true,
|
cfg.compilerOptions.pchConfig = new GccToolchainConfig.PrecompilerHeaderOptions(
|
||||||
pchSourceSet: 'dedicated_pch'
|
enabled: true,
|
||||||
);
|
pchSourceSet: 'dedicated_pch'
|
||||||
|
);
|
||||||
|
}
|
||||||
cfg.compilerOptions.languageStandard = 'c++0x'
|
cfg.compilerOptions.languageStandard = 'c++0x'
|
||||||
cfg.defines([
|
cfg.defines([
|
||||||
'_strdup': 'strdup',
|
'_strdup': 'strdup',
|
||||||
@ -50,10 +51,15 @@ void setupToolchain(NativeBinarySpec b) {
|
|||||||
'_vsnprintf': 'vsnprintf',
|
'_vsnprintf': 'vsnprintf',
|
||||||
'_snprintf': 'snprintf',
|
'_snprintf': 'snprintf',
|
||||||
]);
|
]);
|
||||||
|
if (useGcc) {
|
||||||
|
// MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AES and PCLMUL instruction set support.
|
||||||
|
cfg.compilerOptions.args '-march=sandybridge', '-Wno-write-strings'
|
||||||
|
} else {
|
||||||
|
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp', '-fno-rtti'
|
||||||
|
}
|
||||||
|
cfg.compilerOptions.args '-fno-exceptions'
|
||||||
cfg.linkerOptions.stripSymbolTable = false;
|
cfg.linkerOptions.stripSymbolTable = false;
|
||||||
cfg.linkerOptions.staticLibStdCpp = false;
|
cfg.linkerOptions.staticLibStdCpp = false;
|
||||||
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp', '-fno-rtti', '-fno-exceptions'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolchainConfigUtils.apply(project, cfg, b);
|
ToolchainConfigUtils.apply(project, cfg, b);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user