Commit Graph

26 Commits

Author SHA1 Message Date
GoaLitiuM 5240b26fb8 D: Use the documented syntax for various arguments 2018-09-05 20:26:11 +03:00
Jussi Pakkanen 9bcd498a2f
Merge pull request #4084 from FFY00/pr-fix-dub-dependencies
dub: enhance dependency handling
2018-09-03 19:30:52 +03:00
Nirbheek Chauhan bead8287a5 Improve support for macOS dylib versioning
We now use the soversion to set compatibility_version and
current_version by default. This is the only sane thing we can do by
default because of the restrictions on the values that can be used for
compatibility and current version.

Users can override this value with the `darwin_versions:` kwarg, which
can be a single value or a two-element list of values. The first one
is the compatibility version and the second is the current version.

Fixes https://github.com/mesonbuild/meson/issues/3555
Fixes https://github.com/mesonbuild/meson/issues/1451
2018-08-29 15:51:23 -07:00
FFY00 124cedde38
dub: enhance dependency handling
fixes #4032: meson now checks properly for the compiler used to compile dub dependencies

fixes #3568: applied the following patch https://paste.debian.net/1039317/

meson now adds flags for native dependencies required by dub modules

meson now checks for the D version implemented by the compiler used to build dub dependencies (execpt gdc which doesn't support this)
2018-08-29 20:22:01 +01:00
Jussi Pakkanen 1ffc8de5e8
Merge pull request #3981 from GoaLitiuM/d-win-fixes
Fix D support on Windows
2018-08-27 22:30:23 +03:00
Jussi Pakkanen 23e6200c14 My bad. 2018-08-23 21:16:28 -07:00
GoaLitiuM fd2c3b4c77 Handle proper linking of MSVC runtime libraries
DMD expects mscrtlib arguments while compiling, whereas LDC2 expects these while linking.
2018-08-20 22:27:31 +03:00
GoaLitiuM 4a1d64cb6c Fix import libraries and static library naming 2018-08-20 22:27:31 +03:00
GoaLitiuM 7ab938d9af Ignore unix related compiler arguments on Windows 2018-08-20 22:27:31 +03:00
GoaLitiuM 79f05b189a Follow target platform defined in MSVC environment for Windows D compilation 2018-08-20 22:27:31 +03:00
GoaLitiuM e677f2f552 Pass -install-name arguments to linker 2018-08-20 20:25:25 +03:00
GoaLitiuM c2a872c4fc Fix D soname arguments for Windows and OSX 2018-08-20 20:25:25 +03:00
GoaLitiuM 12d5c6114e Fix wrong DMD optimization levels 2018-08-20 19:20:29 +03:00
Jussi Pakkanen d83f77109a
Convert buildtype to optimization and debug options (#3489) 2018-08-18 20:39:47 +03:00
Matthias Klumpp 7618fa81d3 d: Don't fail if -link-defaultlib is manually added to the LDC link args 2018-06-30 00:28:39 +03:00
Nirbheek Chauhan 96b7fdb723 macos: Rewrite install_name for dependent built libraries on install
On macOS, we set the install_name for built libraries to
@rpath/libfoo.dylib, and when linking to the library, we set the RPATH
to its path in the build directory. This allows all built binaries to
be run as-is from the build directory (uninstalled).

However, on install, we have to strip all the RPATHs because they
point to the build directory, and we change the install_name of all
built libraries to the absolute path to the library. This causes the
install name in binaries to be out of date.

We now change that install name to point to the absolute path to each
built library after installation.

Fixes https://github.com/mesonbuild/meson/issues/3038
Fixes https://github.com/mesonbuild/meson/issues/3077

With this, the default workflow on macOS matches what everyone seems
to do, including Autotools and CMake. The next step is providing a way
for build files to override the install_name that is used after
installation for use with, f.ex., private libraries when combined with
the install_rpath: kwarg on targets.
2018-06-18 06:33:23 +00:00
Xavier Claessens b7d442150d Move <lang>_args to coredata.compiler_options 2018-06-06 20:02:37 +00:00
Nirbheek Chauhan ed701b5cb0 Revert "Add macOS linker versioning information"
This reverts commit fa6ca16054.

Closes https://github.com/mesonbuild/meson/issues/3550
2018-05-09 23:11:15 +02:00
Tom Schoonjans fa6ca16054 Add macOS linker versioning information
This patch exploits the information residing in ltversion to set the
-compatibility_version and -current_version flags that are passed to the
linker on macOS.
2018-04-16 22:26:16 +03:00
Jussi Pakkanen ea3b54d402 Use include_directories for D impdirs.
Change the code to store D properties as plain data. Only convert them
to compiler flags in the backend. This also means we can fully parse D
arguments without needing to know the compiler being used.
2018-02-25 19:42:15 +02:00
Matthias Klumpp 7e0db58f81 d: gdc: Implement proper dependency gen support
Older versions of GDC had broken support for the -MQ flag (resulting in
a compiler error). New versions of GDC have this issue fixed (some older
versions received a backport). Starting with GCC 7.1 we can assume
dependency generation to always work reliably.
2018-02-20 19:35:28 +02:00
Christoph Behle 5b83894b77 More version information for D 2017-12-16 15:07:08 +01:00
Matthias Klumpp 6cd3f066b4 d: Implement specific properties for D features 2017-09-12 17:32:03 +02:00
Matthias Klumpp d83c289442 d: Add easy way to use D-specific features
Of course D compilers have different flags to set some important
D-specific settings. This adds a simple method to change these flags in
a compiler-agnostic way in Meson.

This replaces the previous `unittest_args` method with a more generic
variant.
2017-09-12 17:32:03 +02:00
Jussi Pakkanen 2269b7f60b Add build_rpath as new property allowing people to specify rpath entries that are used in the build tree but will be removed on install. 2017-07-21 19:40:54 +03:00
Alistair Thomas 117f4ab8b5 Split out languages from compilers.py 2017-06-23 00:42:41 +01:00