How can I remove or ignore arguments from the swift compiler

705 Views Asked by At

Im trying to use an older xcode toolchain (3.1) with my latest xcode version (10).

Starting with a blank project and trying to build I get the following error.

<unknown>:0: error: unknown argument: '-enable-batch-mode'
<unknown>:0: error: unknown argument: '-enforce-exclusivity=checked'
<unknown>:0: error: unknown argument: '-index-store-path'
Command CompileSwiftSources failed with a nonzero exit code

When I look at the compiler output I can clearly see these parameters being passed (cropped for brevity).

/Library/Developer/Toolchains/swift-3.1-RELEASE.xctoolchain/usr/bin/swiftc **-incremental -module-name MyTestApp -Onone -enable-batch-mode -enforce-exclusivity=checked** -DDEBUG -sdk 

Is it possible to tell the compiler to ignore these parameters or remove them somehow?

I had considered building with CLI and cobbling the buuild command together but I need the source to be running in xcode so I can debug an issue with a legacy project.

1

There are 1 best solutions below

0
On

In the end I just downloaded an older version of xcode and also downloaded device support for my new ios device..... which the older xcode didnt support.