25 Commits

Author SHA1 Message Date
Ronald Wampler
162b3dee2c Explicitly link with libc++
When building with Xcode 8 beta (on my system at least), clang produced the following warning:

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9

It appears clang will link with libstdc++ if present by default instead of libc++. This was verified using `otool -L bundles.dylib` which produce the following output prior to this change.

bundles.dylib:
	@rpath/bundles.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/OakSystem.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/io.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/plist.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/regexp.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/scope.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/text.dylib (compatibility version 1.0.0, current version 1.0.1)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

With this change the output is now:

bundles.dylib:
	@rpath/bundles.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/OakSystem.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/io.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/plist.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/regexp.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/scope.dylib (compatibility version 1.0.0, current version 1.0.1)
	@rpath/text.dylib (compatibility version 1.0.0, current version 1.0.1)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
2016-06-14 20:49:31 +02:00
Ronald Wampler
14c6a70b85 Use our own lightweight wrapper for thread local storage
With the boost thread helper we have to statically link to the boost libraries, which on most system is built against the latest version of the OS (instead of our current target 10.7). This doesn't seem to be an actual problem, but newer versions of clang issue warnings about it.
2015-08-11 21:01:07 +02:00
Allan Odgaard
9d1d1a1a5a Link directly with static versions of boost libraries
This is currently using absolute paths since it’s a quick fix.
2015-06-13 19:16:10 +02:00
Ronald Wampler
172ce9d428 Replace thread_local with boost equivalent
The new version of clang (Apple LLVM version 6.1.0) as shipped with Xcode 6.3, disabled TLS. According to http://clang.llvm.org/cxx_status.html, in order to support `thread_local`, the C++ runtime library from g++-4.8 or later is needed.

For now, we can use the boost `thread_specific_ptr`. This is probably a reasonable solution since 1) it should be portable with old and future versions of (Apple's) clang and 2) requires no additional dependencies.
2015-04-30 15:15:56 +02:00
Allan Odgaard
09dfe50051 Avoid taking the address of compound literals
Clang considers this to be an error, previously we disabled diagnostics for this case, but probably better to adapt our code.
2014-11-30 09:12:07 +07:00
Allan Odgaard
fe798f4c0e Don’t explicitly define targets as applications or libraries
Libraries can be identified by either being linked with other targets, or exporting headers, so that is what we do.
2014-11-20 14:58:34 +01:00
Allan Odgaard
f16e83fb4f Get rid of APP_REVISION
This was just mirroring the last part of our version number so redundant and it wasn’t monotonically increasing as we switched from alpha.n → beta.1 (with n > 1), so it probably did more harm than good.
2014-10-30 20:49:10 +01:00
Allan Odgaard
ac9f64ed4a Do not specify SDK version as using ‘latest’ is generally desired
If we need to build with a specific version we can include it in CC/CXX using the --sdk argument.
2014-09-05 14:31:05 +02:00
Allan Odgaard
397fdb52d4 Make REST_API a global define and make it a C string 2014-04-28 18:23:50 +07:00
Allan Odgaard
3bc0c65c7a Introduce variable for where cap’n’proto is installed
Set the `capnp_prefix` variable when calling ./configure.

E.g. build and install cap’n’proto in $HOME/build:

    ./configure --disable-shared --prefix="$HOME/build"
    make -j6 check && make install

Then configure TextMate to find it there:

    capnp_prefix="$HOME/build" ./configure
2014-03-30 11:18:41 +07:00
Allan Odgaard
77eb21f33e Switch from C++11 → C++1y (C++14) 2014-03-16 18:06:03 +07:00
Allan Odgaard
e2d2b1ef6a Do not pass -fobjc-default-synthesize-properties to clang
This option was removed in revision 191551 of clang (Sep 27, 2013).

Property synthesizing seems to now be default, it’s unclear to me what revision of clang made the behavior default, but since we require a fairly recent version for other things (like Cap’n’proto) I don’t think this change will cause a problem.
2014-02-15 09:40:59 +07:00
Allan Odgaard
4080e1dc96 Add support for serialization of cache_t with cap’n proto
See http://kentonv.github.io/capnproto/install.html for how to install.
2013-08-18 17:14:23 +02:00
Jacob Bandes-Storch
847bef3bdd Use @rpath so frameworks can be loaded from the app bundle
@executable_path is the originally-executed program, whereas @loader_path is the program that caused the load to occur (e.g. a Quick Look generator). @rpath can be changed at link time — a QL generator can specify a value that points to the enclosing app bundle’s Frameworks directory.
2013-07-30 22:16:17 +02:00
Allan Odgaard
c9812c5e8a Do not set hidden visibility for C sources
This is for oniguruma and ideally we would set this only for the oniguruma target, but then we need special precompiled headers for that target, so this is a practical way to achieve the goal (there are no other C sources in the build tree).
2013-07-21 13:25:29 +02:00
Allan Odgaard
bd5b105a44 Only set -fobjc-link-runtime for app targets
Ideally this should be set for executable targets that use Objective-C (and have deployment target set to 10.7).

This change is a quick fix for not having pure C++ tests leak. For more info see https://github.com/sorbits/rdar/blob/master/LeakWith10_7ObjCRunTime/README.md
2013-02-25 15:28:37 +01:00
Allan Odgaard
91d786b2cd Don’t set -fobjc-arc-cxxlib=libc++
I never understood what this option was good for and now it gives a warning about being unused during compilation (even though it was set only during linking).
2013-02-02 08:52:13 +01:00
Allan Odgaard
e7b81dba9b Strip indirectly referenced dylibs
Basically libraries referenced indirectly will be setup as a requirement of the target and this option strips that. Doesn’t really matter, but enabling it rather than deleting the line (which was previously commented).
2013-01-29 21:16:49 +01:00
Allan Odgaard
71be61cbbb Enable ARC by default
We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
2012-12-19 19:42:36 +01:00
Allan Odgaard
065f5552bb Enable implicit @synthesize
I haven’t removed the current use of @synthesize since that results in a build that throws exceptions and crashes.
2012-09-12 18:30:37 +02:00
Allan Odgaard
7cfc9c38fc Link with -fobjc-link-runtime for arclite 2012-08-29 14:27:35 +02:00
Jacob Bandes-Storch
dca4292990 Use 64-bit: compiler/linker settings 2012-08-28 21:32:46 +02:00
Jacob Bandes-Storch
502b9e59d1 Use colored diagnostics for compiler output 2012-08-28 20:34:05 +02:00
Jacob Bandes-Storch
c6b6d1a21d Use libc++: compiler/linker settings 2012-08-28 13:30:20 +02:00
Allan Odgaard
9894969e67 Initial commit 2012-08-09 16:25:56 +02:00