1 Reply
      Latest reply on Apr 29, 2019 7:36 AM by afromnil
      LAGApollo Level 1 Level 1 (0 points)

        Hi there,

         

        We are currently facing a problem around compilation and `swiftc` command.

         

        When building, xcode gives the list of files to compile to swiftc in absolute path :

         

        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: Module)
            cd /Users/user/Documents/workspace/company/project
            export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
            export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk
            /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Module -Onone -whole-module-optimization -enforce-exclusivity=none -DDEBUG -Onone -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -target x86_64-apple-ios9.3-simulator -g -module-cache-path /Users/user/Documents/workspace/company/project/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -index-store-path /Users/user/Documents/workspace/company/project/DerivedData/project/Index/DataStore -swift-version 4.2 -I /Users/user/Documents/workspace/company/project/DerivedData/project/Build/Products/development-iphonesimulator -F /Users/user/Documents/workspace/company/project/DerivedData/project/Build/Products/development-iphonesimulator -F /Users/user/Documents/workspace/company/project/Carthage/Build/iOS /Users/user/Documents/workspace/company/project/Module/File.swift /Users/user/Documents/workspace/company/project/Module/File2.swift /Users/user/Documents/workspace/company/project/Module/File3.swift

         

         

        We found the `working-directory` parameter to the swiftc command and wonder how to make xcode use it, in order to reduce the command line length ?

        We are currently reaching the mac os buffer limit for command line, that is 2Mb.