Commit Graph

41 Commits

Author SHA1 Message Date
Aleksey Gurtovoy 6ac5db50c9 CUDA support on Windows 2019-09-24 14:22:20 -07:00
Jussi Pakkanen d67d5411bb
Merge pull request #5823 from scivision/linker-pgi-linux
PGI compiler fixes
2019-09-05 23:45:54 +03:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Michael Hirsch, Ph.D c8d380e4ef
PGI: use ar link wrapper on Windows 2019-09-05 11:50:17 -04:00
Kramer Peace 7e8febaa8c Add get_soname_args method to CUDA linker
Currently it retruns an empty string array.
2019-09-05 08:38:56 -07:00
Kramer Peace fb9a5ce867 Add a CUDA linker object
Fixes issue #5870
2019-09-05 08:38:56 -07:00
Dylan Baker 0efab591da compilers: Move the compiler argument to proxy linker flags to the compiler class
Instead of the DynamicLinker returning a hardcoded value like
`-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be
something '-Xlinker='

This makes a few things cleaner, and will make it possible to fix using
clang (not clang-cl) on windows, where it invokes either link.exe or
lld-link.exe instead of a gnu-ld compatible linker.
2019-08-30 00:01:32 +03:00
Dylan Baker 6864058b10 Fix type annotations in linkers for python < 3.5.4
Before python 3.5.4 typing didn't have the NoReturn type, use a string
to forward declare it.

aside: I can't wait to be able to use python 3.7's
__future__.annotations and not have to deal wit hthis anymore.

Fixes #5822
2019-08-21 20:51:59 +03: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
Dylan Baker 4e74867f4b linkers: Add DMDs optlink 2019-08-14 13:13:23 -07:00
Dylan Baker 1bb5d53b5a linkers: Add SolarisDynamicLinker
A dynamic linker for solaris/opensolaris. This is still completely
untested and probably doesn't work.
2019-08-14 13:13:23 -07:00
Dylan Baker c77414a20b linkers: Add intel xilink 2019-08-14 13:13:23 -07:00
Dylan Baker d9b6b5de31 linkers: Add MSVC like linkers 2019-08-14 13:13:23 -07:00
Michael Hirsch, Ph.D 7c5b25ce51 linkers: Add PGIDynamicLinker 2019-08-14 13:13:23 -07:00
Dylan Baker cd134b78c0 linkers: Add the armclang dynamic linker 2019-08-14 13:13:23 -07:00
Dylan Baker 5ababa413c linkers: Add ArmDynamicLinker class
Much of this code was written by Vasu Penugonda
2019-08-14 13:13:23 -07:00
Dylan Baker 686fd03af5 linkers: Add Ccrx Dynamic Linker 2019-08-14 13:13:23 -07:00
Dylan Baker 3406b315be linkers: Add class for Intel Xild linker. 2019-08-14 13:13:23 -07:00
Dylan Baker c0a1ec9346 linkers: Add the AppleDynamicLinker 2019-08-14 13:13:23 -07:00
Dylan Baker 43d47899f8 linkers: Add LLVM linker 2019-08-14 13:13:23 -07:00
Dylan Baker d708b274a1 linkers: Add GNU linkers 2019-08-14 13:13:23 -07:00
Dylan Baker b5b48f33bc linkers: Add a PosixDynamicLinkerMixin
This is a mixin class for DynamicLinkers that aims to provide only the
most basic posix-like linker arguments, in other words bits that gnu ld,
apple's ld, solaris's ld, and other completely disjoint linkers that are
used on Unix-like OSes share.
2019-08-14 13:13:23 -07:00
Dylan Baker 6770af4d36 linkers: Add a Dynamiclinker base class
This class defines a few basics, and sets up the other methods that a
linker needs to implement.
2019-08-14 13:13:23 -07:00
Dylan Baker e0f036f3a4 linkers: Always use mesonlib namespace 2019-07-23 09:58:24 +00:00
Dylan Baker 24c4c079e7 linkers: Add get_base_link_args method to static linkers
MSVC needs an argument to static linkers for doing LTO, so we need a way
for the static linker to tell us that.
2019-07-23 09:58:24 +00:00
Dylan Baker 32c57ca782 linkers: simplify and annotate
I started out just annotating, but realized there is a lot of really
silly duplication of methods in this module. Nearly all of the methods
return [], but each class implemented the same methods over and over!
I've fixed this by moving the default implementation down into the
`StaticLinker` class, and then overriding as necessary in the derived
classes.
2019-07-23 09:58:24 +00:00
Dylan Baker 7d0e0d6f6e linkers: Add linker class for intel's xilib 2019-05-13 11:22:31 -07:00
Dylan Baker af19db7b40 linkers: Split Visual Studio Linker into a mixin
Because ICL has it's own linker that behaves basically just like the
VisualStudioLinker, but with a few peices of extra functionality.
2019-05-13 11:22:31 -07:00
Jon Turney a223b20bb6
Fix linking when cross-compiling and a windows resource is first object
It appears that LIB/LINK default to the host architecture if they can't
guess it from the first object.  With the MSVC toolchain, resource files
are (usually) compiled to an arch-neutral .res format.  Always
explicitly provide a '/MACHINE:' argument to avoid it guessing
incorrectly when cross-compiling.
2019-01-05 20:22:13 +00:00
Phillip Cao 68c83cb213 Add support for Renesas CC-RX toolchain 2018-11-08 00:02:22 +13:00
GoaLitiuM bc4bf03871 D: Fix incorrect arch handling in D linkers 2018-09-20 19:00:12 +03:00
GoaLitiuM 8fa7c29661 D: Fix linker detection when static linker is missing
Fallback to using D compilers as static linkers when no suitable static linker were found.
2018-09-13 22:07:19 +03:00
GoaLitiuM 82b38b6071 Fallback to LDC as static linker when not in MSVC build environment 2018-08-20 22:27:31 +03:00
mohdamerkhalidi 28754ea621 Adding a new AR Linker Class for the ARM Compiler. (#3949) 2018-08-14 23:04:43 +03:00
Mathieu Duponchelle d784b5772a ArLinker: Use response files on Windows
ninja chokes when building FFmpeg's static libraries, as the
command line can be larger than 32000.

This was disabled on purpose in #1649, but the rsp syntax was
different: this commit makes it so the options and output file
are still passed on the command line, gcc-ar didn't work
otherwise.
2018-06-25 16:12:35 +00:00
Elliott Sales de Andrade dbb025a175 Add an OpenMP dependency.
This works similarly to the thread dependency which stores the various
inconsistent flags in each compiler.
2018-04-17 02:04:37 -04:00
Bedarkar, Malhar a2ee76228e First cut of ARMCC support for MESON.
Change-Id: I15d8258e84d392baaccb8f670e33eefcfe8cd49a
2018-03-05 18:26:39 -06:00
Dylan Baker fc547ad05e haiku: do not add pthread arguments
Haiku has pthreads, but they are part of the standard C library, and do
not need either special compiler or linker flags.
2017-12-07 09:35:12 -08:00
Nirbheek Chauhan 387b5e67a0 linkers: Return a Copy of VisualStudioLinker always_args
Otherwise people will accidentally append to it.
2017-12-03 10:06:11 +05:30
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 e5559903b3 Split linkers out from compilers.py 2017-06-22 20:09:58 +01:00