Xcode 7: <unknown>:0: error: no such file or directory: '"-Onone"'

I took my existing project, ran the project and Swift migrations and now I get the following error when trying to compile.


<unknown>:0: error: no such file or directory: '"-Onone"'


I've tried starting over and building without the migrations and it still doesn't work.


My project is a hybrid Swift and Objective-C project. The build appears to be failing when trying to compile the Swift module which appears to be for the Watch extension.


CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
    cd /Users/MrRogers/Development/MyProjectPath
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name MyProject_WatchKit_Extension \"-Onone\" -sdk


So I removed it from my project and I get the same error message when trying to compile the Swift in my main project.


CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    cd /Users/MrRogers/Development/MyProjectPath
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name MyProject \"-Onone\" -sdk


Any thoughts?

Accepted Reply

Oh, so I had the `SWIFT_OPTIMIZATION_LEVEL` set to `-Onone` in my xcconfig file. Removing that and adding it directly to build settings seems to have worked. Bleh!

Replies

Oh, so I had the `SWIFT_OPTIMIZATION_LEVEL` set to `-Onone` in my xcconfig file. Removing that and adding it directly to build settings seems to have worked. Bleh!