1. 09 Sep, 2016 1 commit
    • Drew's avatar
      Support Xcode 8 GM · a4d211ee
      Drew authored
      * Drop test coverage for Xcode 7 since it's likely not installed
      * We now pull paths from xcode-select when we don't specify a toolchain which is saner than using hardcoded paths
      * We now more robustly test if a given toolchain is from xcode 7 or not rather than rely on the filename
      * Bootstrap for Xcode 8 installed to Xcode.app
      a4d211ee
  2. 02 Aug, 2016 1 commit
    • Drew's avatar
      Update to swift preview 3 · e4524c67
      Drew authored
      * We can't use system anymore in preview 3.  This introduces a lot of issues around envrionment variables, which can't be listed in swift :-(.  So we no longer inherit environment variables, we only set the ones we set.
          * We do pass on PWD and PATH, because otherwise that would be terrible
      * Toolchain is now a part of platform config instead of something we pass around by hand.
      * We now detect xcode 7 / 8 depending on whether we're using a toolchain installed to Xcode.app or Xcode-beta.app.  That's still not right, but fuck it.
      e4524c67
  3. 30 Jun, 2016 1 commit
    • Drew's avatar
      Add actual effects to the configurations · 8f797026
      Drew authored
      This extends #104 by adding actual effects to the configurations rather than have them be no-ops.
      
      Effects include:
      
      * debug instrumentation (new in this PR), for emitting `-g` (see #73 for an obvious extension)
      * optimization control / WMO control
      * compression level (faster debug atbins)
      * test instrumentation (`-enable-testing`)
      * `#if ATBUILD_RELEASE` etc. from Swift code
      
      There are some deprecations associated with this PR:
      
      * `whole-module-optimization` atllbuild option is now deprecated; use `--configuration release` instead.  There currently is no plan to control these separately, use `--configuration plain` + `:compileOptions ["-O"]` to get optimization without WMO.  Or open a bug to complain about this change.
      * `magic` atllbuild option is now deprecated; to opt out of magic use `--configuration none` instead.
      
      Doc PR to follow.
      
      In addition, CI is now updated to produce release (optimized) builds for atbuild, which significantly optimizes atbuild performance.
      8f797026
  4. 18 May, 2016 1 commit
    • Drew's avatar
      Fix WMO · 1aba8e49
      Drew authored
      We previously used a (pretty bad) hack for WMO.  This resulted in issues like #92.
      
      Upstream now has proper support for WMO (see generally, https://github.com/apple/swift-llbuild/pull/28, https://bugs.swift.org/browse/SR-881).
      
      We now use the upstream feature to handle this case.  We also add -num-threads support, which upstream recently added.
      
      Note that our implementation now only works for swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a and above.
      
      Resolve #92
      1aba8e49
  5. 12 May, 2016 1 commit
  6. 22 Apr, 2016 1 commit
  7. 15 Apr, 2016 1 commit
    • Drew's avatar
      Add proper platform support · 9ecf5b64
      Drew authored
      Related to #36
      
      Presently, we tend to enable platform-specific config with an overlay.
      There are a variety of problems identified with this approach:
      
      1.  There is no convention for which overlay to use for platform-
      specific config.  This complicates the ecosystem.
      
      2.  In general, a program is always compiled "for some platform" but in
      practice a user may forget the necessary overlay.  `require-overlays`
      can catch this misconfig, but A) it has to be opted into in the atpkg,
      and B) there is no good way to default to the running platform, which is
      the sane behavior.
      
      3.  Currently, tools tend to conditionally-compile platform-specific
      code.  The effect of this is to complicate bootstrapping, as a Linux
      binary *cannot* perform some OSX behavior (and vice versa) because the
      necessary code is not present in the executable.
      
      4.  This is not scaleable to cross-compilation (iOS for example is
      Coming Soon but can't be supported in this architecture)
      
      To work around these problems, we introduce a `Platform` enum, to
      replace `PlatformPaths`.  `Platform` is a runtime technology, allowing
      for a Linux binary to reason about what the behavior would be on OSX
      etc.
      
      Internally, we have three "platforms":
      
      * `hostPlatform`, the platform on which `atbuild` is currently executing
      * `targetPlatform`, the platform for which we are compiling. By default
         this is the `hostPlatform`
      * `buildPlatform`, the platform where `swift-build-tool` will run.
         This is usually the `hostPlatform`, but if we are bootstrapping it
         is the `targetPlatform` instead.
      
      The user can override the `targetPlatform` by the use of `--platform
      foo`.  `linux` and `osx` are supported.  `mac` is supported as an alias
      of `osx`.
      
      The primary effect of a platform is to scope tool-specific behavior
      (e.g., target=OSX uses the OSX SDK, host=Linux uses a linux path for the
      toolchain, etc).
      
      In addition to the tool-specific behavior, we enable overlays for the
      target platform:
      
      * `atbuild.platform.linux` on Linux
      * `atbuild.platform.osx` and `atbuild.platform.mac` on OSX
      
      This allows packages to reliably perform per-platform configuration in
      the overlays.  Critically, some platform overlay is reliably active, so
      users in most cases will not have to `--use-overlay` to get proper
      platform behavior.
      
      DEPRECATION WARNING: We believe the `swiftc-path` key is no longer
      required, as the functionality used can be achieved either by
      `--toolchain` or `--platform`.  Therefore, I'm adding a warning to users
      that we intend to remove it and to try these features instead.
      
      We need to put out a release with these features (and the warning)
      before I'm happy to remove it.  In particular, we use it inside
      atbuild/atpkg, and removing it immediately would break bootstrapping, so
      let's give it a little time before we tear it out.  We should remove it
      from the documentation though.
      9ecf5b64