         args += buildParameters.toolchain.extraCCFlags
         args += optimizationArguments
 
-        // Add extra C++ flags if this target contains C++ files.
-        if clangTarget.isCXX {
-            args += self.buildParameters.flags.cxxCompilerFlags
-        }
-
         // Only enable ARC on macOS.
       #if os(macOS)
         args += ["-fobjc-arc"]

        args += ["-j\(SwiftCompilerTool.numThreads)", "-DSWIFT_PACKAGE"]
        args += additionalFlags
        args += moduleCacheArgs
        args += buildParameters.swiftCompilerFlags
        return args
    }

        args += ["-Xlinker", "-rpath=$ORIGIN"]
      #endif
        args += objects.map({ $0.asString })

        // User arguments (from -Xlinker and -Xswiftc) should follow generated arguments to allow user overrides
        args += buildParameters.linkerFlags
        args += stripInvalidArguments(buildParameters.swiftCompilerFlags)
        return args
