mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[driver] Add support for invoking ld.
swift_driver can now end-to-end compile a Swift file. Try it yourself!
echo 'println("hello")' | swift_driver -
Swift SVN r12840
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "swift/AST/DiagnosticsFrontend.h"
|
||||
#include "swift/Subsystems.h"
|
||||
#include "swift/Driver/Options.h"
|
||||
#include "swift/Driver/Util.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Option/Arg.h"
|
||||
@@ -48,13 +49,7 @@ void CompilerInvocation::updateRuntimeImportPath() {
|
||||
llvm::SmallString<128> LibPath(SearchPathOpts.RuntimeIncludePath);
|
||||
|
||||
llvm::Triple Triple(TargetOpts.Triple);
|
||||
if (Triple.isiOS())
|
||||
if (Triple.getArch() == llvm::Triple::ArchType::x86)
|
||||
llvm::sys::path::append(LibPath, "iphonesimulator");
|
||||
else
|
||||
llvm::sys::path::append(LibPath, "iphoneos");
|
||||
else if (Triple.isMacOSX())
|
||||
llvm::sys::path::append(LibPath, "macosx");
|
||||
llvm::sys::path::append(LibPath, getPlatformNameForTriple(Triple));
|
||||
|
||||
SearchPathOpts.RuntimeImportPath = LibPath.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user