Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Commit

Permalink
C++ Do not include a few switches on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Oct 6, 2020
1 parent 93d5d2f commit c366071
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions jtransc-gen-cpp/src/com/jtransc/gen/cpp/CppCompiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.jtransc.gen.cpp

import com.jtransc.JTranscSystem
import com.jtransc.JTranscVersion
import com.jtransc.env.*
import com.jtransc.error.invalidOp
import com.jtransc.gen.common.BaseCompiler
import com.jtransc.vfs.ExecOptions
Expand Down Expand Up @@ -41,16 +42,18 @@ object CppCompiler {
cmdAndArgs += "-fexceptions"
cmdAndArgs += "-frtti"
cmdAndArgs += "-D_FORTIFY_SOURCE=0" // Without this: *** buffer overflow detected ***: terminated
cmdAndArgs += "-static"
cmdAndArgs += "-static-libgcc"
cmdAndArgs += "-static-libstdc++"
if (!OS.isMac) {
cmdAndArgs += "-static"
cmdAndArgs += "-static-libgcc"
cmdAndArgs += "-static-libstdc++"
cmdAndArgs += "-fdce"
cmdAndArgs += "-Wl,--gc-sections"
}
//cmdAndArgs += "-Wa,-mbig-obj"
cmdAndArgs += "-fdce"
//cmdAndArgs += "-flto"
//cmdAndArgs += "-ffunction-sections"
//cmdAndArgs += "-fdata-sections"
cmdAndArgs += "-fwhole-program"
cmdAndArgs += "-Wl,--gc-sections"
cmdAndArgs += "-std=c++11"
if (config.debug) {
cmdAndArgs += "-g"
Expand Down

0 comments on commit c366071

Please sign in to comment.