1054 Commits

Author SHA1 Message Date
Matthew Bauer
dc2bb1c379 Add more xcspecs.
Adds:

- com.apple.build-tools.nmedit
- com.apple.compilers.lex
- com.apple.compilers.resource-copier
- com.apple.compilers.yacc
2016-11-11 12:35:52 -08:00
Onha Choe
0e9140921a fix builtin pbxcp 2016-11-09 17:20:36 -08:00
Grant Paul
6b73b95757 Fix specification to pass in preprocessor defines. 2016-11-08 23:14:05 -08:00
Grant Paul
70b7e25b0e Add unit test for property list copy built-in utility.
Tests basic functionality of copying multiple property lists while
converting them to a standard format.
2016-11-07 15:55:41 -08:00
Grant Paul
b892b152e1 Improve JSON parsing to handle more edge cases.
Using a JSON parser test suite, refine number and key parsing to match
the JSON specification. Remaining issues are related to Unicode support,
escape sequences, and trailing commas.

The last of those is intentionally non-conforming for compatibility.
2016-11-07 14:32:19 -08:00
Grant Paul
3f4520da4b Fix builtin tool execution in simple executor. Add unit test.
The success check was inverted for builtin tools. The correct behavior
can be tested using a series of in-memory resource implementations.
2016-11-07 13:06:49 -08:00
Grant Paul
234c1761aa Add null output formatter to print no additional output.
This is useful for quiet builds or for unit tests of execution.
2016-11-07 13:06:49 -08:00
Matthew Justin Bauer
0095088227 Add copy-{tiff,png}-file.xcspec to CMakeFiles.txt 2016-11-07 11:33:14 -08:00
brtsai
4357d4dccf made default usage print size and checksum for files 2016-11-04 18:58:35 -07:00
brtsai
82e641471f renamed octConvertingStream to stream 2016-11-04 18:58:35 -07:00
brtsai
2a401e275c made lsbom default usage print correct info
default usage prints mode(oct) and UID/GID now
2016-11-04 18:58:35 -07:00
Grant Paul
9ccf7c40ae Store order of print options in BOM list options. 2016-11-04 18:58:35 -07:00
Grant Paul
ef95e55f47 Delay resolving executable paths until execution time.
Rather than looking at the filesystem to find an executable path at
configuration time, find the executable at execution time. This allows
different executors to handle searching for paths differently (for
example, using internal or external builtin tools), and avoids using
the filesystem during configuration.
2016-10-28 21:06:03 -07:00
Grant Paul
fd3a151699 Add JSON support to property list utility. Fixes #160. 2016-10-28 14:29:10 -07:00
Grant Paul
e4f4b6b6ce Adjust loaded platform specifications for additional domains. 2016-10-27 17:11:27 -07:00
Onha Choe
ff45fb5f4b Put linker option "-dependency_info $(dependency_info_file)" only on darwin
linkers in other platforms won't have this option
2016-10-27 12:18:50 -07:00
Onha Choe
b680eb1fc5 address comments from https://github.com/facebook/xcbuild/pull/168 2016-10-25 17:02:06 -07:00
Onha Choe
cb78bce065 Be safe when putting -mininum-deployment-target option
if the option is not found and resolves to empty string,
it will have dangling -mininum-deployment-target option without value
and fail
2016-10-25 17:02:06 -07:00
Grant Paul
bcaed07eca Minor specification additions & cleanups.
- Complete strip and product validation specification options.
 - Fix typo in specification property and file type listing.
 - Minor formatting adjustments to a few specifications.
2016-10-24 14:05:35 -07:00
Grant Paul
3df0c95355 Add a few missing asset catalog compiler driver options.
They are parsed but not yet used during compilation.
2016-10-24 10:51:03 -07:00
Grant Paul
feb4307c88 Parse most of the remaining asset fields. 2016-10-21 15:23:50 -07:00
Grant Paul
291acb0fb5 Load all child assets; provide simple API to fetch specific ones.
Before, each asset type handled loading assets independently. This
caused inconsistencies in when assets were loaded, and didn't handle
more complex asset linking scenarios correctly.

Instead, unconditionally load all child assets. When specific child
assets are needed, search for them within the loaded children rather
than on disk. Additionally, provide convenience APIs to reference
single-child assets in types that reference those.

A future enhancement will support asset types that contain specific
types of child assets but do not list the asset filenames explicitly
in other asset properties.
2016-10-21 15:23:50 -07:00
Grant Paul
ac0a0f139e Add basic unit test for loading nested asset groups. 2016-10-21 15:23:50 -07:00
Grant Paul
6913fad858 Add missing piece to actually load the new asset types. 2016-10-21 15:23:50 -07:00
Grant Paul
242f97adb0 Avoid reference counting for asset catalog loading.
Asset catalogs form a tree, not a graph, so there is no requirement
for reference counting. Simplify the possibility space by removing
reference counting in favor of direct ownership of child assets.
2016-10-21 15:23:50 -07:00
Grant Paul
9a01b7f257 Minor fixes and refactoring for sticker asset types. 2016-10-21 15:23:50 -07:00
Grant Paul
bb475741ec Parse remaining new asset types. 2016-10-21 15:23:50 -07:00
Grant Paul
79a8dc3c64 Add definitions for some newer asset archive format fields.
The extra metadata section stores a string with contextual info
on how the asset archive was compiled, especially when the archive
is stripped to target certain devices or platforms.

Other new fields correspond to new asset document format fields.
2016-10-21 15:23:33 -07:00
Onha Choe
c38cb6ea97 Address comments from review 2016-10-21 09:59:47 -07:00
Onha Choe
6c55e1573e Add Specification
add basic specifications for
clang analyzer/astbuilder/migrator
coredata compilers (momc, mapc)
strip tool
builtin validation tool
2016-10-21 09:59:47 -07:00
Matthew Justin Bauer
938479ed2d Add new files to CMakeLists.txt
Three files were missing: abstreactassetcatalog.xcspec, file.swiftpm-manifest.xcspec, and folder.stickers.xcspec
2016-10-20 00:40:16 -07:00
Grant Paul
76259e9fbb Minor cleanups to previous commit.
- Use (const) pointers instead of references to match existing style.
 - Replace switches on types with casting, reduce switch nesting.
2016-10-19 09:36:47 -07:00
Onha Choe
354662502b Add merge command to PlistBuddy 2016-10-17 13:45:27 -07:00
Grant Paul
69af7fbf90 Modernize and complete SDK loading.
- Warn about missing keys when parsing; add currently missing keys.
 - Use optionals to avoid unsafely assuming parsed values always exist.
 - Update style to match other libraries.
2016-10-13 17:41:12 -07:00
Grant Paul
2ef6c1db6b Parse new product type specification options. 2016-10-13 17:40:38 -07:00
Grant Paul
db44433ded Improve message for build phase without file reference. Fixes #156. 2016-10-13 10:29:22 -07:00
Grant Paul
49f8a5923f Unit test for toolchain info parsing. 2016-10-12 13:25:57 -07:00
Naris Siamwalla
9a234067d6 [xcbuild] Make PlistBuddy return a non-zero code on error
Summary: For each of the PlistBuddy subcommands, on false, return '1' exit code.

Test Plan:
Ran PlistBuddy -c "Print :BogusKeyThatDoesntExist"  /tmp/app.plist
echo $? returns 1

Ran PlistBuddy -c "Print :CFBundleShortVersionString"  /tmp/app.plist
echo $? returns 0
2016-10-11 21:14:39 -07:00
Fosco Marotto
06e258eff5 Support Info.plist in Toolchains 2016-10-10 22:12:22 -07:00
Jack Wu
fd366234ff [actool] Fix car header key format in Writer 2016-10-10 21:08:27 -07:00
Grant Paul
f4d5004b3e Allocate enough space for Unicode strings in binary property lists.
Before, only half as much space as needed was allocated.
2016-10-08 11:33:03 -07:00
Kellie Medlin
54a136e588 [process] Don't use the constructor attribute on Linux
Using `__attribute__((constructor))` doesn't seem to get argc and argv
as arguments with certain versions of the libc. On the other hand, using
the `.init_array` section works so use that as a workaround until we can
find a cleaner fix.

h/t to @sas for this fix. This is a minimal fix for my problems when
using xcbuild tools on my Linux machine.

Fixes issue#138.
2016-10-07 11:18:19 -07:00
Kolin Krewinkel
f9c9cebacb Add option for specifying compiled asset file name.
Use ` --compile-output-filename` to specify.
2016-10-06 11:16:19 +08:00
Grant Paul
116c06feaf Require explicit copies of expensive environment objects. 2016-10-06 11:14:02 +08:00
Grant Paul
421af06559 Only allow absolute paths in the memory filesystem.
In the future, this will be expanded to all filesystems.
2016-10-06 11:03:15 +08:00
Grant Paul
f64b848a46 Link required libraries when using threading functions. Fixes #139. 2016-10-05 19:29:14 -07:00
Stephane Sezer
825092cbee Fix a few typos in uninmplemented features 2016-10-06 09:12:49 +07:00
Grant Paul
eef06a4979 Add sticker-related asset types. 2016-10-05 19:04:47 -07:00
Grant Paul
53e0f96f72 Add new and missing asset properties to existing asset types. 2016-10-05 19:04:47 -07:00
Kellie Medlin
807b41bd42 [Rendition] Make sure 'algorithm' is initialized for release builds
When build xcbuild with -NDEBUG, assert() is compiled out and, to the compiler,
the 'algorithm' variable has the potential to be uninitialized. Refactor the code
so it compiles cleanly.
2016-10-04 17:42:15 -07:00