Commit Graph

20 Commits

Author SHA1 Message Date
Dylan Baker 0c22798b1a compilers: replace CompilerType with MachineInfo
Now that the linkers are split out of the compilers this enum is
only used to know what platform we're compiling for. Which is
what the MachineInfo class is for
2019-10-07 12:08:20 -07:00
Dylan Baker 06dcbd50ee compilers: Dispatch to dynamic linker class
Most of the cuda code is from Olexa Bilaniuk.
Most of the PGI code is from Michael Hirsc
2019-08-14 13:13:23 -07:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04:00
Daniel Mensinger e75211d321
Fix builtin variable names 2019-04-29 12:17:40 +02:00
John Ericson 6dbe33d949 C# and Java compilers should have `is_cross = False`
All compilers should define this attribute. Probably should change base
class to require this.
2019-02-01 13:22:01 -05:00
Daniel Mensinger 9eca2e46a0
Added more compiler option support 2019-01-06 12:19:33 +01:00
Daniel Mensinger 9742927903
Absolute path generation refactoring 2019-01-06 12:19:32 +01:00
Daniel Mensinger c4eb5c79fe
Added unit test 2019-01-06 12:19:28 +01:00
Daniel Mensinger 71d17b44e4
Fixed list_target_files and list_targets 2019-01-06 12:19:28 +01:00
Jussi Pakkanen d83f77109a
Convert buildtype to optimization and debug options (#3489) 2018-08-18 20:39:47 +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
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 dd74f3fb55 Hide banner when invoking csc. 2018-02-25 02:48:39 +02:00
Thibault Saunier c48b9594ff Add support for Visual Studio csc c# compiler 2018-02-25 01:10:52 +02:00
Christoph Behle 783263b9f4 More version information for C# 2017-12-16 15:05:09 +01: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
Guillaume Poirier-Morency bbddf51a54 Use 'C sharp' instead of 'C#'
The '#' is reserved for Ninja comments and cannot be escaped.
2017-06-26 20:03:52 -04:00
Guillaume Poirier-Morency fab5634916 Add 'Compiler.get_display_language'
Use this when we print language-related information to the console and
via the Ninja backend.
2017-06-26 14:15:44 -04:00
Alistair Thomas 117f4ab8b5 Split out languages from compilers.py 2017-06-23 00:42:41 +01:00