Permalink
Browse files

Enable ARC by default

We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
  • Loading branch information...
1 parent 2ae8d93 commit 71be61cbbbe5f32fda8545805acaf5cce24368f7 @sorbits sorbits committed Dec 19, 2012
View
@@ -1,3 +1,4 @@
-BUILD = app
-FLAGS += -D'APP_REVISION=$APP_REVISION' -DCOMPILE_DATE=\"`date +%Y-%m-%d`\"
-TARGETS = */target
+BUILD = app
+FLAGS += -D'APP_REVISION=$APP_REVISION' -DCOMPILE_DATE=\"`date +%Y-%m-%d`\"
+OBJCXX_FLAGS += -fno-objc-arc
+TARGETS = */target
@@ -3,6 +3,3 @@ LINK += bundles ns OakFoundation OakTextView
EXPORT = src/BundleEditor.h
CP_Resources = resources/* templates/*.plist gfx/**/*.png
FRAMEWORKS = Cocoa AddressBook
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -2,6 +2,3 @@ SOURCES = src/*.mm
LINK += OakAppKit OakFoundation bundles text cf ns
EXPORT = src/BundleMenu.h
FRAMEWORKS = AppKit
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -2,3 +2,5 @@ SOURCES = src/*.mm
LINK += updater network OakFoundation
EXPORT = src/BundlesManager.h
FRAMEWORKS = Foundation
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -3,6 +3,3 @@ EXPORT = src/CrashReporter.h
LINK += ns io plist network OakFoundation
FRAMEWORKS = Foundation AddressBook
LIBS += z
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -3,3 +3,5 @@ CP_Resources = resources/*
LINK += command text authorization scm bundles cf Find HTMLOutputWindow io ns OakAppKit OakFileBrowser OakFilterList OakFoundation OakSystem OakTextView BundleEditor network Preferences
EXPORT = src/DocumentController.h src/DocumentOpenHelper.h src/FileTypeDialog.h
FRAMEWORKS = Cocoa
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -4,3 +4,5 @@ EXPORT = src/Find.h src/scan_path.h
CP_Resources = resources/*
LINK += text editor io ns OakAppKit OakFoundation regexp scope
FRAMEWORKS = Cocoa
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -3,3 +3,5 @@ EXPORT = src/HTMLOutput.h
CP_Resources = resources/*
LINK += text ns document command OakAppKit OakFoundation OakSystem
FRAMEWORKS = Cocoa WebKit
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -2,6 +2,3 @@ SOURCES = src/*.mm
EXPORT = src/HTMLOutputWindow.h
LINK += HTMLOutput command
FRAMEWORKS = Cocoa
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -4,3 +4,5 @@ TEST_SOURCES = tests/*.{cc,mm}
LINK += text ns io OakFoundation regexp scm file
EXPORT = src/*.h
FRAMEWORKS = Carbon Cocoa AudioToolbox Quartz
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -2,3 +2,5 @@ SOURCES = src/*.{cc,mm}
LINK =
FRAMEWORKS = Cocoa ExceptionHandling
EXPORT = src/*.h
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -3,3 +3,5 @@ EXPORT = src/OakFileBrowser.h
CP_Resources = resources/* gfx/**/*
LINK += text cf document editor io regexp settings ns plist OakAppKit OakFoundation scm OakSystem Preferences XcodeEditor
FRAMEWORKS = Cocoa Carbon SystemConfiguration
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -3,3 +3,5 @@ EXPORT = src/OakFilterList.h src/datasources/*.h
CP_Resources = resources/*
LINK += text bundles document io plist MGScopeBar ns OakAppKit OakFoundation OakSystem OakTextView regexp scope
FRAMEWORKS = Cocoa Carbon
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -2,6 +2,3 @@ SOURCES = src/*.mm
LINK += text io regexp
EXPORT = src/*.h
FRAMEWORKS = Cocoa
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -3,3 +3,5 @@ EXPORT = src/OakDocumentView.h src/GutterView.h src/OakTextView.h
CP_Resources = resources/*
LINK += layout text bundles editor document theme ns plist OakAppKit OakFoundation OakSystem regexp scope settings BundleMenu
FRAMEWORKS = Cocoa
+
+OBJCXX_FLAGS += -fno-objc-arc
@@ -3,6 +3,3 @@ EXPORT = src/{Preferences,Keys,TerminalPreferences,PreferencesPane}.h
CP_Resources = resources/* icons/* ../../rmate/rmate
LINK = MASPreferences MGScopeBar BundlesManager OakAppKit OakFoundation plist ns file bundles SoftwareUpdate CrashReporter
FRAMEWORKS = Cocoa AddressBook
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -4,6 +4,3 @@ EXPORT = src/*.h
CP_Resources = resources/*
LINK += OakAppKit OakFoundation OakSystem network ns cf plist
FRAMEWORKS = Cocoa WebKit
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -2,6 +2,3 @@ SOURCES = src/*.cc
EXPORT = src/{layout,paragraph,ct}.h
LINK += text buffer selection bundles theme cf ns
TEST_SOURCES = tests/*.{cc,mm}
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
@@ -3,6 +3,3 @@ TEST_SOURCES = tests/*.{cc,mm}
LINK += text OakFoundation plist
FRAMEWORKS = Cocoa
EXPORT = src/*.h
-
-OBJCXX_FLAGS += -fobjc-arc
-LN_FLAGS += -fobjc-arc-cxxlib=libc++
Submodule dialog updated 3 files
+10 −0 README.mdown
+5 −4 cli.target
+1 −0 plugin.target
Submodule dialog-1.x updated 2 files
+5 −4 cli.target
+1 −0 plugin.target
View
@@ -173,8 +173,8 @@ def pch_for(src, target)
target['PRELUDE'].each do |pch|
if srcExt == pch[/\b[a-z]+$/]
res = build_path(pch)
- res << "-arc" if srcExt == 'm' && target['OBJC_FLAGS'] =~ /-fobjc-arc/
- res << "-arc" if srcExt == 'mm' && target['OBJCXX_FLAGS'] =~ /-fobjc-arc/
+ res << "-no-arc" if srcExt == 'm' && target['OBJC_FLAGS'] =~ /-fno-objc-arc/
+ res << "-no-arc" if srcExt == 'mm' && target['OBJCXX_FLAGS'] =~ /-fno-objc-arc/
return res
end
end
@@ -675,9 +675,9 @@ open("#{builddir}/build.ninja", "w") do |io|
io << " RAVE_FLAGS = #{type[ext]}\n\n"
if ext =~ /^mm?$/
- io << "build #{pch_for(src, TARGETS.root)}-arc.gch: #{compiler_for(src)} #{src} | #{cc}\n"
- io << " depfile = #{pch_for(src, TARGETS.root)}-arc.gch.d\n"
- io << " RAVE_FLAGS = #{type[ext]} -fobjc-arc\n\n"
+ io << "build #{pch_for(src, TARGETS.root)}-no-arc.gch: #{compiler_for(src)} #{src} | #{cc}\n"
+ io << " depfile = #{pch_for(src, TARGETS.root)}-no-arc.gch.d\n"
+ io << " RAVE_FLAGS = #{type[ext]} -fno-objc-arc\n\n"
end
end
View
@@ -14,12 +14,13 @@ FLAGS += -DNDEBUG -Os
# LINK = OakDebug
CXX_FLAGS += -std=c++11 -stdlib=libc++
-OBJC_FLAGS += -Xclang -fobjc-default-synthesize-properties -std=c99 -fobjc-abi-version=3
+OBJC_FLAGS += -fobjc-arc -Xclang -fobjc-default-synthesize-properties -std=c99 -fobjc-abi-version=3
OBJCXX_FLAGS += -std=c++11 -stdlib=libc++ -fobjc-abi-version=3
-OBJCXX_FLAGS += -Xclang -fobjc-default-synthesize-properties -fobjc-call-cxx-cdtors
+OBJCXX_FLAGS += -fobjc-arc -Xclang -fobjc-default-synthesize-properties -fobjc-call-cxx-cdtors
LIBS += c++
LN_FLAGS += -m64 -mmacosx-version-min=$APP_MIN_OS -isysroot "$sdk"
+LN_FLAGS += -fobjc-arc-cxxlib=libc++
LN_FLAGS += -fvisibility=hidden
LN_FLAGS += -Wl,-dead_strip
# LN_FLAGS += -Wl,-dead_strip_dylibs
View
@@ -1,2 +1,3 @@
-BUILD = lib
-TARGETS = */target
+BUILD = lib
+OBJC_FLAGS += -fno-objc-arc
+TARGETS = */target

0 comments on commit 71be61c

Please sign in to comment.