Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Dylan Baker 7460e4ccda compilers: Make get_display_language a class or static method
Currently this is done at the instance level, but we need it at the
class level to allow compiler "lang" args to be gotten early enough.
This patch also removes a couple of instance of branch/leaf classes
providing their own implementation that is identical to the Compiler
version.
2019-12-12 09:35:32 -08:00
Dylan Baker ee6e249f65 compilers: move language attribute to the class level
We know that if a compiler class inherits CCompiler it's language will
be C, so doing this at the class level makes more sense.
2019-12-12 09:35:30 -08:00
Michael Hirsch, Ph.D 83b4e981c4 Use strict function prototypes 2019-11-18 22:21:36 +02:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Aleksey Gurtovoy f56ef583d3 dependency('cuda') 2019-11-05 22:17:44 +02:00
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
Aleksey Gurtovoy 6ac5db50c9 CUDA support on Windows 2019-09-24 14:22:20 -07:00
Kramer Peace caec875fe1 Create CUDA linker with CUDA compiler
Since they are laways paired there is no need to "search" for the cuda
linker.
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 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 61255eca16 compilers/cuda: pass through extra kwargs 2019-08-14 13:13:23 -07:00
Dylan Baker 499c44dc77 compilers/cuda: don't use re for replacement
Even with the check (for extra safety) string.replace is more than twice
as fast.
2019-08-14 13:13:23 -07:00
Dylan Baker cd5360821a compilers: split gnu and gnulike compilers out of compilers
I debated a bit whether both classes really belong in the same module,
and decided that they do because the share a number of helpers.
2019-07-15 10:59:22 -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 971dfd664b
Added some cahced values 2019-04-28 14:33:21 +02:00
John M. Lindemon 939c00a972 Fix nvcc error with threads dependency (4999) 2019-02-28 21:02:14 +02:00
Olexa Bilaniuk 8838cfae73 Solve NVCC -Werror problem.
Partially addresses #4961.
2019-02-24 09:02:57 -05:00
Olexa Bilaniuk e632a81627 Rework CUDA sanity check.
PArtially addresses #4961.

Also make the sanity check do double duty as a GPU architecture
detection test.
2019-02-24 09:02:45 -05:00
jml1795 a9e63568fe Add warning level zero 2019-02-19 00:06:27 +02:00
Olexa Bilaniuk df0b734a17 Fixes for CUDA compiler shared library linking.
Also adds test case for shared library linking.

Closes #4912, at least on Linux. The future 0.50.0 does not yet claim to
support CUDA on systems other than Linux and backends other than Ninja.
2019-02-13 21:07:11 +02:00
Jussi Pakkanen 25ae7f95bd Add werror flags to nvcc. Closes #4911. 2019-02-13 10:29:10 +02:00
Jussi Pakkanen e1b50309df All the fixes needed to make work against current master. 2019-01-21 23:59:20 +02:00
Jussi Pakkanen 8eca221aac More tests and pic. 2019-01-21 23:35:38 +02:00
Jussi Pakkanen 396e355c94 Clean up minor issues. 2019-01-21 23:35:38 +02:00
Beau Johnston 54b6afa675 added cuda compiler 2019-01-21 23:35:38 +02:00