mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- Added a couple of new targets: - libswiftDriver, which contains most of the driver implementation - swift_driver, which produces the actual executable - Added centralized version information into libswiftBasic. - Added a new "Driver Design & Internals" document, which currently describes the high-level design of the Swift driver. - Implemented an early version of the functionality of the driver, including versions of the Parse, Pipeline, Bind, Translate, and Execute driver stages. Parse, Pipeline, and Bind are largely implemented; Translate and Execute are early placeholders. (Translate produces "swift_driver --version" and "ld -v" commands, while Execute performs all subtasks sequentially, rather than in parallel.) This is just the starting point for the Swift driver. Tests for the existing behavior are forthcoming. Swift SVN r10933
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
//===--- ToolChains.h - ToolChain Implementations ---------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_DRIVER_TOOLCHAINS_H
|
|
#define SWIFT_DRIVER_TOOLCHAINS_H
|
|
|
|
#include "swift/Basic/LLVM.h"
|
|
#include "swift/Driver/ToolChain.h"
|
|
#include "llvm/Support/Compiler.h"
|
|
|
|
namespace swift {
|
|
namespace driver {
|
|
namespace toolchains {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Darwin : public ToolChain {
|
|
protected:
|
|
virtual std::unique_ptr<Tool> buildLinker() const;
|
|
public:
|
|
Darwin(const Driver &D, const llvm::Triple &Triple) : ToolChain(D, Triple) {}
|
|
~Darwin() = default;
|
|
|
|
/// Get the "Darwin" arch name for particular compiler arguments.
|
|
/// For example, Darwin treats each different ARM variation as a distinct
|
|
/// architecture.
|
|
StringRef getDarwinArchName(const llvm::opt::ArgList &Args) const;
|
|
};
|
|
|
|
} // end namespace toolchains
|
|
} // end namespace driver
|
|
} // end namespace swift
|
|
|
|
#endif
|