diff options
| author | Jack Nagel | 2013-11-12 12:00:18 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-11-12 13:53:29 -0600 |
| commit | 74673633c02feb1a3040ead43a9112a0053fe3b0 (patch) | |
| tree | 626a73a399adc62fbfa956a90167c524b9fc08b2 /Library | |
| parent | 16d242970376e6944191a038b3b259c0ecfb29d1 (diff) | |
| download | brew-74673633c02feb1a3040ead43a9112a0053fe3b0.tar.bz2 | |
Extract optflags method from cflags method
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/ENV/4.3/cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index cd77caf0b..fced0780a 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -167,6 +167,20 @@ class Cmd args << '-pipe' args << '-w' unless configure? + args.concat(optflags) + args.concat(archflags) + args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/ + args + end + def cxxflags + args = cflags + args << '-std=c++11' if cccfg? 'x' + args << '-stdlib=libc++' if cccfg? 'g' + args << '-stdlib=libstdc++' if cccfg? 'h' + args + end + def optflags + args = [] args << '-Os' # When bottling use the oldest supported CPU type. @@ -184,16 +198,6 @@ class Cmd else args << '-march=native' if tool =~ /clang/ end - - args.concat(archflags) - args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/ - args - end - def cxxflags - args = cflags - args << '-std=c++11' if cccfg? 'x' - args << '-stdlib=libc++' if cccfg? 'g' - args << '-stdlib=libstdc++' if cccfg? 'h' args end def archflags |
