Skip to content

Instantly share code, notes, and snippets.

@samdmarshall
Last active August 29, 2015 14:19
Show Gist options
  • Save samdmarshall/d8d7c992142725cdc61d to your computer and use it in GitHub Desktop.
Save samdmarshall/d8d7c992142725cdc61d to your computer and use it in GitHub Desktop.

in /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/Swift.xcspec find the dictionary with identifier com.apple.xcode.tools.swift.compiler and under options add this:

{
	Name = "SWIFT_DEBUG_TIME_FUNCTION_BODIES";
	Type = Boolean;
	DefaultValue = YES;
	CommandLineArgs = {
		YES = (
			"-Xfrontend", "-debug-time-function-bodies",
		);
		NO = ();
	};
	FileTypes = (
		"sourcecode.swift",
	);
},

Then add SWIFT_DEBUG_TIME_FUNCTION_BODIES as a user defined build setting to turn this on and off per configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment