Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
Otherwise we can end up searching for the same library tens of times,
because pkg-config does not de-duplicate -lfoo args before returning
them.
We use -Wl,--start-group/end-group, so we do not need to worry about
ordering issues in static libraries.
|
|
|
|
It is important to keep the list of languages up to date in
optinterpreter, otherwise we could have conflicting options when adding
new languages.
|
|
|
|
|
|
|
|
Parent class could have common options for all compilers, and we'll soon
add some.
|
|
Normally, people would just pass -fembed-bitcode in CFLAGS, but this
conflicts with -Wl,-dead_strip_dylibs and -bundle, so we need it as
an option so that those can be quietly disabled.
|
|
These directories contain DLLs that the executable may need, such as
libstdc++-6.dll, libwinpthread, etc.
|
|
This checks not only for existence, but also for usability of the
header, which means it does a full compilation and not just
pre-processing or __has_include.
Fixes https://github.com/mesonbuild/meson/issues/2246
|
|
Fixes #3622
Raising StopIteration from a generator has been deprecated with Python 3.5 and is now
an error with Python 3.7: https://docs.python.org/3.8/library/exceptions.html#StopIteration
Just use return instead.
|
|
* mesonbuild/compilers/c.py: Make the `find_library` method more generic by allowing the user to supply the `code` for compiling and linking.
* mesonbuild/compilers/fortran.py: Use the methods inherited from `Compiler` base class where appropriate. Also reuse `CComiler` methods where applicable. This should be sufficient to get various compiler/linker arguments as well as to compile and link Fortran programs. This was tested with `gfortran` compiler, and while the other compilers ought to work for simple cases, their methods are primarily inherited from the base `FortranCompiler` class.
* test cases/fortran/10 find library/gzip.f90: Fortran module with some basic Fortran wrapper interfaces to `gzopen`, `gzwrite`, and `gzclose` C `zlib` functions.
* test cases/fortran/10 find library/main.f90: Fortran program using the `gzip` Fortran interface module to write some data to a gzip file.
* test cases/fortran/10 find library/meson.build: Meson build file for this test case. This demonstrates the ability to link the Fortran program against an external library.
|
|
This reverts commit fa6ca160548d7e8df9c4c724e6c96f5e004e5316.
Closes https://github.com/mesonbuild/meson/issues/3550
|
|
|
|
|
|
|
|
ld does not treat wrong -z options as fatal by default.
|
|
It is repeatedly used by e.g. guess_external_link_dependencies.
|
|
compile() method already does it so links() and compiles() shouldn't do
it too. This fix regression introduced in 3d91a08b.
Closes #3431
|
|
Add has_link_argument() and friends
|
|
Add an OpenMP dependency.
|
|
Also add a test for it.
|
|
GCC does not print a warning or error for unknown options if the options
are to disable warnings. Therefore, when checking for options starting
'-Wno-', also check the opposite enabling option. This fixes the case
where e.g. -Wno-implicit-fallthrough is incorrectly reported as supported
by gcc 5.4. To avoid missed warnings when using combinations of flags, such
as in test case "112 has arg", we limit the checking of for the positive
option to where the negative option is checked alone.
|
|
|
|
This works similarly to the thread dependency which stores the various
inconsistent flags in each compiler.
|
|
Closes: #3335.
|
|
super(VisualStudioCCompiler, self) calls CPPCompiler and that's what we
want to avoid.
|
|
This also fix links() not calling args.to_native() unlike compiles()
|
|
|
|
|
|
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.
|
|
GNU LD does not use soname when linking a PE/COFF binary, so it makes no
difference, but it breaks when using the llvm linker (lld), which does
not support the soname flag when building PE/COFF binaries for Windows.
Fix #3179
|
|
Support lcc compiler for e2k (Elbrus) architecture
|
|
The linkers currently do not support ninja compatible output of
dependencies used while linking. Try to guess which files will be used
while linking in python code and generate conservative dependencies to
ensure changes in linked libraries are detected.
This generates dependencies on the best match for static and shared
linking, but this should not be a problem, except for spurious
rebuilding when only one of them changes, which should not be a problem.
Also makes sure to ignore any libraries generated inside the build, to
keep the optimisation working where changes in a shared library only
cause relink if the symbols have changed as well.
|
|
|
|
This caching is only for a single run, so it doesn't help reconfigure.
However, it is useful for subproject setups where different subprojects
will run the same compiler checks.
The cache is also per compiler instance and is not used for functions
that want to read or run the outputted object file or binary.
For gst-build, this halves the number of compiler checks that are run
and reduces configuration time by 20%.
|
|
If paths are absolute the order of search directories is not relevant as the path is already resolved.
|
|
Fixes "warning: --output and -o have no effect when -C or --ccode is set"
get_always_args() adds -C which is already disabling the direct compilation
ability of valac for which -o is used.
|
|
Copy the algorithm used by autoconf.
It computes the upper and lower limits by starting at [-1,1] and
multiply by 2 at each iteration. This is even faster for small numbers
(the common case), for example it finds value 0 in just 2 compilations
where old algorithm would check for 1024, 512, ..., 0.
|
|
Change-Id: Iad9623d20eb5086528dacefce5d2f4f9bb9d0312
|
|
|
|
Recent versions of systemd (starting with v238) started to check for the
existence of the statx structure using the cc.sizeof() operation. The cc
compiler implementation fails to detect this structure because it's size
limit is 128, meaning it will fail for any type larger than 128 bytes in
the following way during cross-compilation checks:
meson.build:10:2: ERROR: Cross-compile check overflowed
Increase the size limit for data types to 1024 bytes, which should give
plenty of room for even large data structures. This is obviously not
guaranteed to be an upper bound, but given the binary search algorithm
implemented in the cross-compile check, raising the limit too high may
significantly increase the time required for this check on smaller data
types.
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
|
|
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
|
|
Provide get_{type}_options_for_target() methods that unite {type} and builtin options.
|