summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Added more compiler option supportDaniel Mensinger2019-01-061-1/+7
|
* Absolute path generation refactoringDaniel Mensinger2019-01-061-0/+14
|
* compilers: Use keyword only arguments for compiler interfacesDylan Baker2018-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Because we need to inherit them in some cases, and python's keyword-or-positional arguments make this really painful, especially with inheritance. They do this in two ways: 1) If you want to intercept the arguments you need to check for both a keyword and a positional argument, because you could get either. Then you need to make sure that you only pass one of those down to the next layer. 2) After you do that, if the layer below you decides to do the same thing, but uses the other form (you used keyword by the lower level uses positional or vice versa), then you'll get a TypeError since two layers down got the argument as both a positional and a keyword. All of this is bad. Fortunately python 3.x provides a mechanism to solve this, keyword only arguments. These arguments cannot be based positionally, the interpreter will give us an error in that case. I have made a best effort to do this correctly, and I've verified it with GCC, Clang, ICC, and MSVC, but there are other compilers like Arm and Elbrus that I don't have access to.
* Only add link arguments when needed in Compiler object methodsJon Turney2018-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | Currently, ComplierHolder.determine_args() unconditionally adds the link arguments to the commmand, even if we aren't linking, because it doesn't have access to the mode (preprocess, compile, link) that _get_compiler_check_args() will use. This leads to command lines like: 'cl testfile.c /nologo /showIncludes /c /Fooutput.obj /Od kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib' which clang-cl considers invalid; MSVS cl accepts this, ignoring the unneeded libraries Change from passing extra_args down to _get_compiler_check_args(), to passing down a callback to CompilerHolder.determine_args() (with a bound kwargs argument), so it can consult mode and kwargs to determine the args to use.
* d: Allow static library to be passed with -L to dmd/ldcMatthias Klumpp2018-10-071-2/+6
|
* Add conditional debug identifiers for D compilers, and enable for debug buildsGoaLitiuM2018-09-271-3/+47
| | | | Also includes parsing the highest integer level for debug and version.
* Implement thread linker args for D compilersMihails Strasuns2018-09-161-0/+3
| | | | | | D compilers are configured to have highest priority when chosing linker for targets mixing C/C++/D code and before this change meson would fail to configure gtest target that uses D library as a dependency.
* D: Fix some compiler arguments not getting passed through properlyGoaLitiuM2018-09-161-1/+1
|
* Merge pull request #4175 from GoaLitiuM/d-archfixesJussi Pakkanen2018-09-161-14/+13
|\ | | | | D: Improve target architecture handling
| * Refactor D target architecture handlingGoaLitiuM2018-09-141-14/+13
| | | | | | | | The stored architecture matches the same format accepted by dub.
* | Use enum instead of `int` for compiler variantsDavid Seifert2018-09-161-4/+3
|/ | | | | | | | * Enums are strongly typed and make the whole `gcc_type`/`clang_type`/`icc_type` distinction redundant. * Enums also allow extending via member functions, which makes the code more generalisable.
* Fix flake8 'imported but unused' reportsJon Turney2018-09-131-1/+0
| | | | | | $ flake8 | grep F401 ./mesonbuild/compilers/d.py:19:1: F401 '.compilers.GCC_CYGWIN' imported but unused ./test cases/unit/35 dist script/replacer.py:3:1: F401 'sys' imported but unused
* Make sure static library files are passed properly to the linkerGoaLitiuM2018-09-061-0/+11
|
* Fix remaining soname and rpath issues on OSXGoaLitiuM2018-09-061-6/+9
|
* Remove translation of file pathsGoaLitiuM2018-09-061-5/+0
| | | | This would also pass all the source and object files to linker, which is not desirable.
* Refactor D argument translation functionGoaLitiuM2018-09-061-23/+45
|
* Improve D link argument handlingGoaLitiuM2018-09-061-4/+3
|
* D: Fix linking errors with static D libraries on WindowsGoaLitiuM2018-09-051-0/+11
|
* D: Use the documented syntax for various argumentsGoaLitiuM2018-09-051-65/+41
|
* Merge pull request #4084 from FFY00/pr-fix-dub-dependenciesJussi Pakkanen2018-09-031-0/+9
|\ | | | | dub: enhance dependency handling
| * dub: enhance dependency handlingFFY002018-08-291-0/+9
| | | | | | | | | | | | | | | | | | | | 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)
* | Improve support for macOS dylib versioningNirbheek Chauhan2018-08-291-4/+2
|/ | | | | | | | | | | | | | 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
* Merge pull request #3981 from GoaLitiuM/d-win-fixesJussi Pakkanen2018-08-271-14/+112
|\ | | | | Fix D support on Windows
| * Handle proper linking of MSVC runtime librariesGoaLitiuM2018-08-201-3/+62
| | | | | | | | DMD expects mscrtlib arguments while compiling, whereas LDC2 expects these while linking.
| * Fix import libraries and static library namingGoaLitiuM2018-08-201-0/+7
| |
| * Ignore unix related compiler arguments on WindowsGoaLitiuM2018-08-201-0/+5
| |
| * Follow target platform defined in MSVC environment for Windows D compilationGoaLitiuM2018-08-201-11/+38
| |
* | My bad.Jussi Pakkanen2018-08-231-1/+1
|/
* Pass -install-name arguments to linkerGoaLitiuM2018-08-201-0/+3
|
* Fix D soname arguments for Windows and OSXGoaLitiuM2018-08-201-3/+12
|
* Fix wrong DMD optimization levelsGoaLitiuM2018-08-201-4/+4
|
* Convert buildtype to optimization and debug options (#3489)Jussi Pakkanen2018-08-181-0/+28
|
* d: Don't fail if -link-defaultlib is manually added to the LDC link argsMatthias Klumpp2018-06-301-0/+8
|
* macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan2018-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move <lang>_args to coredata.compiler_optionsXavier Claessens2018-06-061-2/+2
|
* Revert "Add macOS linker versioning information"Nirbheek Chauhan2018-05-091-2/+2
| | | | | | This reverts commit fa6ca160548d7e8df9c4c724e6c96f5e004e5316. Closes https://github.com/mesonbuild/meson/issues/3550
* Add macOS linker versioning informationTom Schoonjans2018-04-161-2/+2
| | | | | | 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.
* Use include_directories for D impdirs.Jussi Pakkanen2018-02-251-3/+11
| | | | | | 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.
* d: gdc: Implement proper dependency gen supportMatthias Klumpp2018-02-201-3/+10
| | | | | | | 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.
* More version information for DChristoph Behle2017-12-161-8/+8
|
* d: Implement specific properties for D featuresMatthias Klumpp2017-09-121-1/+1
|
* d: Add easy way to use D-specific featuresMatthias Klumpp2017-09-121-5/+50
| | | | | | | | | 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.
* Add build_rpath as new property allowing people to specify rpath entries ↵Jussi Pakkanen2017-07-211-3/+5
| | | | that are used in the build tree but will be removed on install.
* Split out languages from compilers.pyAlistair Thomas2017-06-231-0/+324