Commit Graph

41 Commits

Author SHA1 Message Date
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Michael Gottesman
6f2a6271f5 Update lldb-moduleimport-test for changed LLVM API.
Swift SVN r31819
2015-09-09 04:37:51 +00:00
Michael Gottesman
e864f02690 In all executables make sure to completely initialize LLVM.
I also added a macro called INITIALIZE_LLVM(argc, argv) which moves this logic
into one place and should be used at the beginning of *all* binaries. It
initializes an LLVM shutdown object, sets up the pretty stack trace, and then
initializes all of the parts of LLVM. This will make it easy to update this in
the future.

The reason why a macro was required was because of llvm_shutdown_obj, an RAII
object that cleans up LLVM. It has to be at the function level scope of the main
function.

Swift SVN r31815
2015-09-09 04:37:38 +00:00
Adrian Prantl
0de0d43773 Introduce a -modulewrap driver action that wraps a (merged) .swiftmodule
inside a swift ast section in an object file so it can be passed to the
linker. The driver automatically wraps merged swiftmodules iff the target
is ELF.

rdar://problem/22407666

Swift SVN r31641
2015-09-02 21:56:25 +00:00
Adrian Prantl
e273ae1e9e Generalize lldb-moduleimport-test to accept object format other than Mach-O
Swift SVN r31591
2015-09-01 00:05:29 +00:00
Dmitri Hrybenko
a6a97e6543 Unbreak the build after upstream CMake changes
Swift SVN r26088
2015-03-13 04:20:04 +00:00
Adrian Prantl
9d14113bf3 Adapt for Mach-O clang module container format transition.
NOTE: This may require deleting the Module Cache that build-script
       creates in the swift build dir.

rdar://problem/19104245

Swift SVN r26021
2015-03-12 02:00:56 +00:00
Adrian Prantl
83fce2670e Revert "Adapt for Mach-O clang module container format transition."
This reverts commit 25995 (this commit was missing a few LLVM libraries).

Swift SVN r26020
2015-03-12 02:00:55 +00:00
Adrian Prantl
ae3d758fa8 Adapt for Mach-O clang module container format transition.
NOTE: This may require deleting the Module Cache that build-script
       creates in the swift build dir.

Swift SVN r25995
2015-03-11 22:55:37 +00:00
Jordan Rose
dbd3b60f6b [Serialization] Move (Module)Status and validateSerializedAST into a namespace.
Also into a separate file.

Before (swift/Serialization/SerializedModuleLoader.h):
  ModuleStatus
  SerializedModuleLoader::ValidationInfo
  SerializedModuleLoader::ExtendedValidationInfo
  SerializedModuleLoader::isSerializedAST
  SerializedModuleLoader::validateSerializedAST

After (swift/Serialization/Validation.h):
  serialization::Status
  serialization::ValidationInfo
  serialization::ExtendedValidationInfo
  serialization::isSerializedAST
  serialization::validateSerializedAST

No functionality change, just a lot of renaming and a bit of reorganizing.

Swift SVN r25226
2015-02-12 05:32:25 +00:00
Jordan Rose
de8a05b293 [Serialization] Serialize the SDK path and -Xcc arguments for an app.
...so that the debugger has the best possible chance of being able to load
the app properly.

We don't do this for frameworks today because we don't want to leak this
information into the public module; once we have a distinction between
"the module that ships with the framework" and "the module that goes into
the debug info" we can do this for frameworks as well.

Part of rdar://problem/17670778

Swift SVN r25204
2015-02-11 23:07:48 +00:00
Dmitri Hrybenko
6670bb76ec Rewrite the CMake build system
Swift SVN r24124
2014-12-23 22:15:30 +00:00
Adrian Prantl
9cbf991e80 Update lldb-moduleimport-test to use llvm::object::ObjectFile.
Fixes: rdar://16244944 lldb-moduleimport-test does not support 32-bit executables

Swift SVN r23960
2014-12-16 20:23:58 +00:00
Dmitri Hrybenko
1eea220932 Use one module cache directory for all the lit tests to speed them up
Doing so is safe even though we have mock SDK.  The include paths for
modules with the same name in the real and mock SDKs are different, and
the module files will be distinct (because they will have a different
hash).

This reduces test runtime on OS X by 30% and brings it under a minute on
a 16-core machine.

This also uncovered some problems with some tests -- even when run for
iOS configurations, some tests would still run with macosx triple.  I
fixed the tests where I noticed this issue.

rdar://problem/19125022

Swift SVN r23683
2014-12-04 11:21:48 +00:00
Dmitri Hrybenko
1347b446c9 Stop using the MODULES_SDK variable in -D flags for the C++ compiler
Swift SVN r23097
2014-11-04 05:44:12 +00:00
Jordan Rose
79224874eb [Driver] Switch debug info to use ld's new -add_ast_path option.
Rather than embed AST info directly in binaries, we now include a special
symbol table entry that points to the serialized AST as a separate file.
This requires a very recent version of ld.

We still want to support the __SWIFT,__ast section in a binary because
that's how it's modeled in dSYM, so manually test both modes in
ASTSection_linker.swift.

Part of <rdar://problem/15796201>.

Swift SVN r20421
2014-07-23 18:04:10 +00:00
Doug Gregor
3d3ff6811a Add a pile of missing #includes exposed by pruning includes in top-of-tree LLVM.
Swift SVN r17157
2014-05-01 14:26:34 +00:00
Jordan Rose
d52edd8675 Add -I and -F support to lldb-moduleimport-test.
Swift SVN r15751
2014-04-01 21:47:36 +00:00
Jordan Rose
49ec7c1ea1 Use SWIFT_MODULE_CACHE_PATH for all tools.
Now that the standard library depends on Clang headers, every single tool
needs to specifically avoid using the default module cache when
SWIFT_MODULE_CACHE_PATH is set.

<rdar://problem/16294222>

Swift SVN r14937
2014-03-12 00:27:24 +00:00
Dmitri Hrybenko
f232267f23 Replace llvm::OwningPtr with std::unique_ptr
It looks like llvm::OwningPtr is going to be removed soon.


Swift SVN r14729
2014-03-06 09:47:17 +00:00
Ted Kremenek
028f9d0561 Remove rest of Makefile build except for 'docs' and 'www'.
For 'docs' and 'www' it is possible these are still being used,
as they work independent of the Makefile build.  Keeping them for now.

Swift SVN r14418
2014-02-26 22:21:25 +00:00
Enrico Granata
270bac639d Unbreak the Makefile build - LLDB still needs it
Swift SVN r13534
2014-02-06 01:11:03 +00:00
Enrico Granata
c0f101bbd9 Realized I had undone one change too many - this should build just fine
Swift SVN r13272
2014-02-01 01:24:05 +00:00
Enrico Granata
0f7d446d17 Add a -dump-module option to lldb-moduleimport-test that will dump the module's top level decls after successfully importing
Swift SVN r13271
2014-02-01 01:22:04 +00:00
Jordan Rose
76c04132c0 [driver] In -g mode, create the __SWIFT,__ast section used by the debugger.
The section contains a copy of the serialized module for the binary.

Swift SVN r12924
2014-01-24 18:42:08 +00:00
Chris Lattner
4bed0d6fce more added dependencies, this really doesn't seem right.
Swift SVN r11093
2013-12-10 21:20:27 +00:00
Dmitri Hrybenko
6129bc71ef Build system: specify dependencies more precisely, allows us to build on
systems with more strict linkers


Swift SVN r9611
2013-10-23 04:55:18 +00:00
Greg Parker
90827fff8a Honor environment variable SDKROOT.
Swift SVN r8524
2013-09-20 22:58:36 +00:00
Adrian Prantl
d7c64060cf Debug info: Don't copy the memory for a serialized swift module in an __ast
section. Thanks to Jordan for pointing this out.
No functionality change.

Swift SVN r8022
2013-09-07 00:44:32 +00:00
Adrian Prantl
e77baa78b7 Rename __DWARF/__apple_ast segment and section to __SWIFT/__ast so the
linker doesn't discard it.

Swift SVN r7958
2013-09-05 20:46:34 +00:00
Adrian Prantl
2063a27aea Relocate Mach-O AST section parsing from SerializedModuleLoader/ to ASTSectionImporter/.
Swift SVN r7869
2013-09-03 21:56:53 +00:00
Adrian Prantl
e216617f30 Use portable LLVM header instead of Darwin header.
Swift SVN r7857
2013-09-03 20:14:43 +00:00
Adrian Prantl
d929050173 Implement SerializedModuleLoader::addASTSection() to parse AST sections as
created by IrGen/SwiftASTStreamerPass.

Swift SVN r7851
2013-09-03 18:09:53 +00:00
Adrian Prantl
f12eca77ea change formatting.
Swift SVN r7772
2013-08-30 00:26:34 +00:00
Adrian Prantl
1da2dc442e s/Bitstream/MemoryBuffer/g
Swift SVN r7770
2013-08-30 00:22:27 +00:00
Dmitri Hrybenko
0d157c8d4c Prune unused includes
Swift SVN r7730
2013-08-29 20:06:25 +00:00
Dmitri Hrybenko
ea41db75e7 lldb-moduleimport-test: replace VLA of char with SmallString,
replace iostream with llvm::{outs, errs}


Swift SVN r7729
2013-08-29 18:59:14 +00:00
Dmitri Hrybenko
4ca448273a lldb-moduleimport-test: no-op whitespace fixes
Swift SVN r7727
2013-08-29 18:46:56 +00:00
John McCall
f11057cf02 Fix for Makefile builds.
Swift SVN r7721
2013-08-29 06:47:18 +00:00
Adrian Prantl
31c926660f Extend SerializedModuleLoader to load modules from a bitstream.
Add tools/lldb-moduleimport-test, which simulates LLDB importing modules
from the __apple_ast section in Mach-O files and use it to regression-test
the new API.

Swift SVN r7709
2013-08-29 00:57:05 +00:00