aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
AgeCommit message (Collapse)AuthorFilesLines
2018-11-04Only add link arguments when needed in Compiler object methodsJon Turney1-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.
2018-10-07d: Allow static library to be passed with -L to dmd/ldcMatthias Klumpp1-2/+6
2018-09-27Add conditional debug identifiers for D compilers, and enable for debug buildsGoaLitiuM1-3/+47
Also includes parsing the highest integer level for debug and version.
2018-09-16Implement thread linker args for D compilersMihails Strasuns1-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.
2018-09-16D: Fix some compiler arguments not getting passed through properlyGoaLitiuM1-1/+1
2018-09-16Merge pull request #4175 from GoaLitiuM/d-archfixesJussi Pakkanen1-14/+13
D: Improve target architecture handling
2018-09-16Use enum instead of `int` for compiler variantsDavid Seifert1-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.
2018-09-14Refactor D target architecture handlingGoaLitiuM1-14/+13
The stored architecture matches the same format accepted by dub.
2018-09-13Fix flake8 'imported but unused' reportsJon Turney1-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
2018-09-06Make sure static library files are passed properly to the linkerGoaLitiuM1-0/+11
2018-09-06Fix remaining soname and rpath issues on OSXGoaLitiuM1-6/+9
2018-09-06Remove translation of file pathsGoaLitiuM1-5/+0
This would also pass all the source and object files to linker, which is not desirable.
2018-09-06Refactor D argument translation functionGoaLitiuM1-23/+45
2018-09-06Improve D link argument handlingGoaLitiuM1-4/+3
2018-09-05D: Fix linking errors with static D libraries on WindowsGoaLitiuM1-0/+11
2018-09-05D: Use the documented syntax for various argumentsGoaLitiuM1-65/+41
2018-09-03Merge pull request #4084 from FFY00/pr-fix-dub-dependenciesJussi Pakkanen1-0/+9
dub: enhance dependency handling
2018-08-29Improve support for macOS dylib versioningNirbheek Chauhan1-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
2018-08-29dub: enhance dependency handlingFFY001-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)
2018-08-27Merge pull request #3981 from GoaLitiuM/d-win-fixesJussi Pakkanen1-14/+112
Fix D support on Windows
2018-08-23My bad.Jussi Pakkanen1-1/+1
2018-08-20Handle proper linking of MSVC runtime librariesGoaLitiuM1-3/+62
DMD expects mscrtlib arguments while compiling, whereas LDC2 expects these while linking.
2018-08-20Fix import libraries and static library namingGoaLitiuM1-0/+7
2018-08-20Ignore unix related compiler arguments on WindowsGoaLitiuM1-0/+5
2018-08-20Follow target platform defined in MSVC environment for Windows D compilationGoaLitiuM1-11/+38
2018-08-20Pass -install-name arguments to linkerGoaLitiuM1-0/+3
2018-08-20Fix D soname arguments for Windows and OSXGoaLitiuM1-3/+12
2018-08-20Fix wrong DMD optimization levelsGoaLitiuM1-4/+4
2018-08-18Convert buildtype to optimization and debug options (#3489)Jussi Pakkanen1-0/+28
2018-06-30d: Don't fail if -link-defaultlib is manually added to the LDC link argsMatthias Klumpp1-0/+8
2018-06-18macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan1-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.
2018-06-06Move <lang>_args to coredata.compiler_optionsXavier Claessens1-2/+2
2018-05-09Revert "Add macOS linker versioning information"Nirbheek Chauhan1-2/+2
This reverts commit fa6ca160548d7e8df9c4c724e6c96f5e004e5316. Closes https://github.com/mesonbuild/meson/issues/3550
2018-04-16Add macOS linker versioning informationTom Schoonjans1-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.
2018-02-25Use include_directories for D impdirs.Jussi Pakkanen1-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.
2018-02-20d: gdc: Implement proper dependency gen supportMatthias Klumpp1-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.
2017-12-16More version information for DChristoph Behle1-8/+8
2017-09-12d: Implement specific properties for D featuresMatthias Klumpp1-1/+1
2017-09-12d: Add easy way to use D-specific featuresMatthias Klumpp1-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.
2017-07-21Add build_rpath as new property allowing people to specify rpath entries ↵Jussi Pakkanen1-3/+5
that are used in the build tree but will be removed on install.
2017-06-23Split out languages from compilers.pyAlistair Thomas1-0/+324