1067 Commits

Author SHA1 Message Date
Grant Paul
288caf0577 Make system utilities into members, in order to pass from above.
Static utility methods cannot be passed from above or use different
implementations in different situations.
2016-09-19 10:29:40 +07:00
Grant Paul
7032ae2c00 Use shared utility for all environment variables.
This centralizes reading this global state so it can be passed in.
2016-09-17 22:04:27 +08:00
Grant Paul
632995cf5a Fix building first target when no target option is specified. Fixes #110. 2016-09-16 15:54:18 +08:00
Kellie Medlin
ced35639c7 Fix crasher when running a tool without SDK specified. 2016-09-14 09:04:57 +08:00
Grant Paul
5c5c47df34 Remove implicit environment propagation to subprocesses.
This makes it explicit how the child processes will operate, rather
than always inheriting global state from the parent process. Also,
remove the unused convenience methods from the subprocess launcher.
2016-09-13 11:04:25 +08:00
Kellie Medlin
b89395aa92 Allow xcrun to work with only --toolchains defined when finding tools
If the tool isn't given an SDK, then it doesn't make sense to fail the
tool search if the asked-for tool lives inside one of the given
toolchains.
2016-09-13 11:02:36 +08:00
Grant Paul
2cd37cd346 Pass in user name when loading schemes from user directories.
This ensures that global process state like user ID is not read in
code that can be used from many contexts, like loading schemes.
2016-09-12 09:48:30 +08:00
Grant Paul
9b0f4f32d3 Move utilities referencing system resources to system utilities.
This centralizes all system resources into the system utilities.
2016-09-10 12:05:00 +08:00
Grant Paul
de2c950210 Preload external build configuration files at project load time.
This avoids requiring filesystem access to compute the target environment,
and fixes the layering of build configurations when determining the target
SDK for the build.
2016-09-08 08:58:15 +08:00
Grant Paul
08ffd17ecb Minor syntax cleanups to SDK loading and target environment. 2016-09-05 10:07:50 -07:00
Grant Paul
a7bd6095e5 Rewrite config parsing code to simplify and use filesystem.
Add unit tests for parsing config files, including edge cases.
2016-09-03 00:31:59 -07:00
Grant Paul
f99148b44e Modernize syntax used for storing setting values. 2016-09-03 00:31:57 -07:00
Grant Paul
d5575a65bc Allow parsing settings to fail if equals is missing. 2016-09-03 00:31:56 -07:00
Grant Paul
e7b519503c Fix minor issues revealed by static analysis. 2016-09-02 22:59:40 -07:00
Grant Paul
a07f339945 Automatically import underlying Objective-C modules into Swift. Fixes #92.
Frameworks expect that their underlying Objective-C module is available
in Swift without an explicit bridging header. In order to support that,
a custom module map is needed at build time and an additional flag tells
the Swift compiler to import the underlying module automatically.
2016-08-31 17:51:23 -07:00
Grant Paul
8957c23c3c Generate module map information for use in source invocations.
Like with header map information, compiler invocations can require
the module map information. Generate it before compile invocations
and store it in the tool context.
2016-08-31 17:51:22 -07:00
Grant Paul
92a348d244 Move module map resolution to a separate class.
Module maps are relatively separate from product types.
2016-08-31 17:48:47 -07:00
Grant Paul
25f784e7d8 Separate out module map content creation from module map writing.
This will allow re-using the module map generation as needed.
2016-08-31 17:48:47 -07:00
Grant Paul
36f0bbe087 Support multiple chunks from different sources in auxiliary files.
This allows an auxiliary file to be partially generated and partially
read from disk at execution time.
2016-08-31 17:48:47 -07:00
Grant Paul
85b752f476 Add support for MODULEMAP_FILE to specify module maps. Fixes #88.
The module map is copied into the temporary directory, then at build
time is copied into the built product.
2016-08-31 17:48:47 -07:00
Grant Paul
4eea74a34a Allow copying files with the copy utility that are not in the project. 2016-08-31 17:48:27 -07:00
Grant Paul
7d91c981ca Write auxiliary files at build time, not Ninja generation time.
This allows Ninja to track dependencies properly for auxiliary files,
especially ones that are copied from source files rather than static.

Static auxiliary files are stored in the Ninja using Base64, since
some auxiliary files (e.g. header maps) are binary and thus are not
representable in shell scripts otherwise.

Explicit dependencies of invocations on their auxiliary files are
incomplete to that point that ordering between writing the auxiliary
files and the invocations is required; this is implemented with a
new barrier rule in Ninja between auxiliary files and invocations.
2016-08-31 17:47:46 -07:00
Grant Paul
26e2bc9512 Support auxiliary files with dynamic content from the file system.
Sometimes, auxiliary file content comes from another file, rather than
being defined entirely in code. In that case, delay reading the file to
the execution phase in order to let executors handle that as required.
2016-08-31 17:47:38 -07:00
Grant Paul
b24894a8e0 Add missing include for assert. 2016-08-31 17:37:33 -07:00
Grant Paul
57e8d04685 Simplify pre-allocating BOM indexes and BOM tree entries.
Use a single reserve method to reserve space in BOM indexes or in a
BOM tree's entry index, rather than specifying on initialization.
This better supports reserving additional space after allocation,
which is needed in any case, without sacrificing performance.
2016-08-31 17:35:06 -07:00
Grant Paul
8e36066203 Use filesystem for all file interactions.
In some cases where a filesystem is not available, use a temporary
method to get access to a static instance of the default filesystem.
2016-08-31 16:58:50 -07:00
Marc Salem
596b529f86 Make reading and writing CAR files faster (#107)
* Support faster writes by preallocating indexes
* Allow reading and writing raw key value pairs in libcar
* Remove bom_alloc_empty and bom_tree_alloc_empty
* Keep space for two extra indexes for compatibility
* Include struct bom_variables when checking minimum size of BOM memory
* Remove preallocated_index_count
* Refactor resizing code
* Add API to increase the size of the BOM index free list
* Optimize CAR write by pre-allocting BOM indexes
2016-08-31 16:36:47 -07:00
Grant Paul
11725f9b3a Remove extra syntax around filesystem creation. 2016-08-30 15:16:31 -07:00
Ktwu
85bb880476 Properly print out the SDK version when asked. (#109) 2016-08-24 21:01:12 -07:00
Grant Paul
82120babf7 Remove operators and hash specialization for archive attribute lists.
These methods were unused and they made the attribute list more complex.
2016-08-13 23:48:10 -07:00
Grant Paul
48886b57ae Minor formatting cleanups for asset archive reader. 2016-08-11 20:31:25 -07:00
Grant Paul
7fbcb6a097 Update documentation for required packages on Linux. 2016-08-11 15:52:40 -07:00
Marc Salem
4d2c960da2 Update libpng checksum 2016-08-11 14:54:40 -07:00
Marc Salem
ead2430c06 Update libpng version and url 2016-08-11 14:46:56 -07:00
Marc Salem
c8b2be093f Update libpng version 2016-08-11 14:40:38 -07:00
Grant Paul
1fe3b27cab Add unit test for compiling launch images.
Verifies the output from compiling launch images of various types,
including legacy launch images without a minimum system version.
2016-08-11 14:05:06 -07:00
Grant Paul
01de4a5e04 Add a unit test to verify app icon set compilation.
Verifies the files are copied, the dependency info is populated, the
additional info plist is populated, and nothing else is changed.
2016-08-11 14:05:06 -07:00
Grant Paul
bb71c06654 Move asset compilation dispatch into compile namespace.
This simplifies the compile action and unifies compiling any asset
with the compilation of specific types of assets.
2016-08-11 14:05:06 -07:00
Grant Paul
1cefb78b27 Warn about unsupported options, rather than ignoring. 2016-08-11 14:05:06 -07:00
Grant Paul
99c5a53f9a Write out complete dependency info and outputs in asset compilation.
Print the set of output files, as expected, and output dependency info
as requested by the command line options. The dependency info contains
the full set of inputs and outputs used during compilation.
2016-08-11 14:05:06 -07:00
Grant Paul
7a4b09f389 Add tool to dump dependency info from any format. 2016-08-11 14:05:06 -07:00
Grant Paul
ff7db1f239 Update help message for dependency info tool.
The help message was outdated and referencing old options.
2016-08-11 14:05:06 -07:00
Grant Paul
014d8fe6e8 Add version information to generated dependency info.
Additionally, factor out source of version information to share it
between both the compile and version actions in the actool driver.
2016-08-11 14:05:06 -07:00
Grant Paul
a3bf8e26c0 Revert "Don't allow installing without a prefix, as this can break systems."
This reverts commit 920c1b445d1fe67453f786a08f463c49995b7f1e.
2016-08-08 20:22:52 -07:00
Grant Paul
920c1b445d Don't allow installing without a prefix, as this can break systems.
Various xcbuild tools can conflict with system libraries and executables.
2016-08-08 17:21:40 -07:00
Grant Paul
5244ba6751 Fix GCC 4.9 compilation. Fixes #104. 2016-07-31 11:51:39 -07:00
Marc Salem
d2e1bf3d0c Fix compile errors 2016-07-28 14:35:08 -07:00
Marc Salem
2bd45ab84d Fix compile errors 2016-07-28 14:11:10 -07:00
Grant Paul
ea1b3336c2 Compile launch image assets. (#101)
* Parse minimum system version for launch image assets.

A system version has at least two components separated by dots, with
an optional third component separated by an additional dot.

* Compile launch image assets.

Launch images are copied to the output, and metadata is added to the
partial info plist to describe the launch images.
2016-07-27 18:11:12 -07:00
Grant Paul
b8919d4248 Fix reading and writing empty files in the default filesystem.
Reading or writing zero bytes is not considered successful; bypass
reading and writing completely when there is nothing to read or write.
2016-07-27 17:45:42 -07:00