Commit Graph

29 Commits

Author SHA1 Message Date
Daniel Mensinger 8e60b8c146
test: merge installed_files.txt into test.json 2020-02-25 21:47:42 +01:00
Jussi Pakkanen 58999cad91 Fix macOS library test when using system zlib. 2019-12-17 15:10:13 +02:00
Michael Hirsch, Ph.D acee448fb9 ci/test: unused args for Windows 2019-12-04 10:59:40 +02:00
Mihai Moldovan cc803072e0 tests: add osx test case for PIE builds. 2019-11-29 08:11:06 -08:00
Nirbheek Chauhan 9042130e9a compilers: Fix bitcode and other options for objc code
We were setting the base options for the Objective-C compiler
manually, due to which options such as b_bitcode and b_ndebug were not
getting set at all.

The base options here are the same as for C code with the Clang
compiler, so just use the same inherited list.

Also expand the bitcode test to ObjC and ObjC++ so this doesn't happen
again.
2019-06-23 16:50:24 +03:00
Jussi Pakkanen c34f044814 Fix appleframeworks with multiple modules. 2019-03-10 15:13:21 +02:00
Nirbheek Chauhan c0166355ce Rewrite appleframework and extraframework dependency classes
Instead of only doing a naive filesystem search, also run the linker
so that it can tell us whether the -F path specified actually contains
the framework we're looking for.

Unfortunately, `extraframework` searching is still not 100% correct in
the case when since we want to search in either /Library/Frameworks or
in /System/Library/Frameworks but not in both. The -Z flag disables
searching in those prefixes and would in theory allow this, but then
you cannot force the linker to look in those by manually adding -F
args, so that doesn't work.
2019-02-01 00:14:09 +05:30
Nirbheek Chauhan 42b48cda98 tests: Don't require pkg-config for macOS tests
Only require it on the CI or if pkg-config is found.
2019-01-31 20:12:21 +05:30
Marco Trevisan (Treviño) b484f2ae22 test cases: add missing files to installed_files.txt
All these are marked as files to be installed, so we need list them.
2018-09-14 08:45:48 +02:00
Nirbheek Chauhan bead8287a5 Improve support for macOS dylib versioning
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-29 15:51:23 -07:00
David Seifert cc37a66077 Deduplicate build-tree RPATHs on macOS
* Currently, RPATHs coming from dependencies and
  `build_rpath` provided by the user might contain
  the same path. Apple's `install_name` tool is
  allergic to providing the same argument twice
  when removing RPATHs:

    error: install_name_tool: "-delete_rpath /usr/lib" specified more than once
2018-08-28 23:26:08 -07:00
Jussi Pakkanen 554b484468
Merge pull request #2618 from mesonbuild/osxlinkerfixes
Fix many things have have been slightly broken in OSX
2017-12-03 02:25:44 +02:00
Jussi Pakkanen d812a0c90c Fix OSX CI. This is a bit of a hack but needs to be done. :( 2017-12-03 00:12:46 +02:00
Jussi Pakkanen cabbb30ab4
Merge pull request #2668 from dcbaker/wip/macos-10.13-fixes
macos 10.13 fixes
2017-11-30 22:18:25 +02:00
Jussi Pakkanen ab1f49f400 Specify build_rpath manually to targets linked by hand. 2017-11-26 21:49:54 +02:00
Jussi Pakkanen 3cb7205e46 Update CMake reference file. 2017-11-26 17:34:01 +02:00
Josh Soref 2b0505f222 spelling: targeting 2017-11-26 06:15:13 +00:00
Dylan Baker d75fc3287e tests: Don't run xcode 8 tests on xcode 9
It lacks the necessary SDKs to run the tests.
2017-11-21 14:41:35 -08:00
Nirbheek Chauhan 0c83f8352d dependencies: Add a new class ExternalDependency
This class now consolidates a lot of the logic that each external
dependency was duplicating in its class definition.

All external dependencies now set:

* self.version
* self.compile_args and self.link_args
* self.is_found (if found)
* self.sources
* etc

And the abstract ExternalDependency class defines the methods that
will fetch those properties. Some classes still override that for
various reasons, but those should also be migrated to properties as
far as possible.

Next step is to consolidate and standardize the way in which we call
'configuration binaries' such as sdl2-config, llvm-config, pkg-config,
etc. Currently each class has to duplicate code involved with that
even though the format is very similar.

Currently only pkg-config supports multiple version requirements, and
some classes don't even properly check the version requirement. That
will also become easier now.
2017-06-09 20:21:01 +05:30
blackbox 8de5313288 unit-test for testing xcode frameworks 2017-05-23 12:54:33 +02:00
Nirbheek Chauhan a4255d74f5 Don't generate import library for shared modules
Also add a test for this on all platforms.
2017-04-04 14:59:13 +05:30
Nirbheek Chauhan 0543a378ca tests: Minor fixes to the library-usage tests
Actually use the myFunc() symbol from the library, and actually run the
built executable on macOS.
2017-03-05 05:48:33 -05:00
Nirbheek Chauhan 16c27bef0b Add a cmake file for manual comparison
We differ from cmake in the following manner:

* We only set the major version (SOVERSION) in the dylib
* If SOVERSION is not specified, we deduce it from version (VERSION)

See installed_files.txt for a list of output dylib names.
2017-03-04 09:12:51 -05:00
Nirbheek Chauhan a24651f33a darwin: Also add the major version in the dylib
And symlink to the unversioned library for build-time linking.

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW2

Unlike Autotools, we do not add the minor or micro version in the
filename because the Apple documentation says you must embed that inside
the library with -current_version.
2017-03-04 09:12:51 -05:00
Nirbheek Chauhan eea951c9f3 Add osx test for the XCode 8 fixes to has_function 2016-10-26 23:16:07 +05:30
Nirbheek Chauhan 2549ed8290 Add a test to find libfoo.X.dylib via -lfoo
Alex Băluț reported that on OS X libfoo.0.dylib cannot be found as -lfoo by the
linker, and you must use -lfoo.0 instead. Add a test for this so the CI can
catch such problems. The next commit will contain the fix.
2016-08-16 16:14:09 +05:30
Nirbheek Chauhan 45c8557dc6 Fix tests for the new library/executable naming scheme
Also add new tests for the platform-specific and compiler-specific
versioning scheme.

A rough summary is:

1. A bug in how run_tests.py:validate_install checked for files has been
   fixed. Earlier it wasn't checking the install directory properly.
2. Shared libraries are no longer installed in common tests, and the
   library name/path testing is now done in platform-specific tests.
3. Executables are now always called something?exe in the
   installed_files.txt file, and the suffix automatically corrected
   depending on the platform.
4. If a test installs a file called 'no-installed-files', the installed
   files for that test are not validated. This is required to implement
   compiler-specific tests for library names/paths such as MSVC vs MinGW
5. The platform-specific file renaming in run_tests.py has been mostly
   removed since it is broken for shared libraries and isn't needed for
   static libraries.
6. run_tests.py now reports all missing and extra files. The logic for
   finding these has been reworked.
2016-07-01 20:50:47 +05:30
Jussi Pakkanen d4284aae89 Renamed add_test to test. 2013-06-02 13:18:15 +03:00
Jussi Pakkanen 4dda53483e Simple test for OSX. 2013-03-03 20:30:46 +02:00