Commit Graph

9 Commits

Author SHA1 Message Date
David Farler
27fac39a7d Build fix: last compiler version component not null terminated for atoi
rdar://problem/22730282

Swift SVN r32196
2015-09-24 03:18:57 +00:00
David Farler
9d373d0fc7 Add _compiler_version build configuration
This configuration clause will suppress lex diagnostics and skip parsing
altogether if the code under the clause isn't active - the compiler must
have a repository version greater than or equal to the version given to
_compiler_version.

This option is only meant to be used sparingly and not to track the
Swift *language* version.

Example, if using a compiler versioned 700.0.28:

  #if _compiler_version("700.0.23")
    print("This code will compile for versions 700.0.23 and later.")
  #else
    This + code + will + not + be + parsed
  #endif

Included are new diagnostics for checking that the version is formatted
correctly and isn't empty.

New tests:
- Compiler version comparison unit tests
- Build configuration diagnostics
- Skipping parsing of code under inactive clauses

rdar://problem/22730282

Swift SVN r32195
2015-09-24 02:14:47 +00:00
Dmitri Hrybenko
41cd10e3f1 build-script/libSwiftBasic: properly propagate the Swift version down to
Version.cpp

rdar://19166288 rdar://19445760

Swift SVN r24592
2015-01-21 05:01:42 +00:00
Adrian Prantl
801dc3d20e Debug info: Actually encode the Swift version number instead of constant 1.
<rdar://problem/18729762> CU's RuntimeVersion field should have the Swift runtime version number

Swift SVN r23087
2014-11-03 17:48:06 +00:00
Jordan Rose
9804a1c85e Fix Version.cpp to actually stringify the version, not the macro name.
Swift SVN r15916
2014-04-04 01:40:55 +00:00
Ted Kremenek
9d580f6ebd CMake: Fix string escaping of compiler version so that it works with the Xcode generator. Xcode did not like parsing strings with unbalanced quotes
in the plist file.

This was exposed by r15694, but probably did not manifest as
the string escaping logic previously only happened on B&I submissions.

In this approach, the final version quad is turned into a string
within Version.cpp, not at the -D invocation.

Swift SVN r15708
2014-03-31 23:32:21 +00:00
Joe Pamer
7b771affd9 Add limited build configuration support for testing against compiler submit versions. (rdar://problem/16337966)
This is meant to be utilized for a narrow set of scenarios specific to dogfooding our pre-1.0 compiler, so please do not take any dependencies on this.  In fact, I'll be removing this in the next milestone.  (See rdar://problem/16380797.)

Also included - improve error recovery when parsing broken build configuration clauses.

Swift SVN r15694
2014-03-31 20:34:02 +00:00
Argyrios Kyrtzidis
778c6cbe37 [Driver] When printing out the version also print out the submission version.
Swift SVN r13756
2014-02-10 19:10:01 +00:00
Connor Wakamo
ed2038585f Initial set of changes to add a new 'swift_driver' executable.
- 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
2013-12-06 21:23:01 +00:00