Граф коммитов

186 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a339290fac Revert "More 10.7 -> 10.9 bumps"
This reverts commit 24a4360600.
2018-07-25 11:56:18 +02:00
Alex Soto 24a4360600 More 10.7 -> 10.9 bumps 2018-07-18 15:10:41 -05:00
Sebastien Pouliot 2d6ce7459d
Bump to use Xcode 10 beta 1 (#4179)
* Bump to use Xcode 10 beta 1

* Update Versions.plist

* Add a dependency on Xcode 9.4.

* [msbuild] Fix build with Xcode 10 beta 1. (#4182)

Many years ago (in Xcode 7 according to code comment)
Developer/Platforms/iPhoneOS.platform/Developer/usr disappeared, and we coped
by looking at Developer/usr instead (and also the subsequent code to locate
the bin directory was based on the location of the usr directory).

Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared in Xcode 10
beta 1, but it seems useless (for one it doesn't contain a bin directory), so
in order to try to keep things sane don't look for this directory in Xcode 10
and instead go directly for Developer/usr (which is what we've been using as
the usr directory for years anyway).

Fixes this problem when building apps with Xcode 10 beta 1:

      /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(626,3): error : Could not locate SDK bin directory [/Users/rolf/Projects/TestApp/test-app.csproj]

* [runtime] Build 32-bit mac executables using Xcode 9.4.

* [mtouch] Work around broken tvOS headers in Xcode 10 beta 1.

* [mtouch] Work around build problem with Apple's simd headers in Objective-C++ mode.

* Use version-agnostic paths to sdk directories.

* [tests][xtro] Add todo files (from unclassified) and adjust ignore files to avoid errors

* [macos][security] Re-enable SSL[Get|Set]AlpnProtocols. Fixes #4001 (#4022)

* [macos][security] Re-enable SSL[Get}Set]AlpnProtocols. Fixes #4001

This was fixed in macOS 10.13.4

https://github.com/xamarin/xamarin-macios/issues/4001

* [tests][monotouch-tests] Disable a few test cases (one crasher, other failures). Causes to be verified later

* [xharness] Fix permission dialog suppression in Xcode 10.

* [xharness] Ignore 32-bit macOS tests by default.

* [tests] Execute mmp regression tests with Xcode 9.4 since many of them are 32-bit and needs porting to 64-bit.

* [mmptest] Ignore 32-bit XM tests if we don't have a 32-bit-capable Xcode.

* [registrar] Add workaround for broken headers in Xcode 10 beta 1 (radar 40824697).

* [mtouch] Restrict another workaround for an Xcode 10 beta 1 bug to a specific Xcode version to remove it asap.

* [tests] Fix some protocol changes (public or not) find by introspection tests

* [tests][intro] Fix DefaultCtorAllowed failures

* [Intents] Obsolete several Intents classes in watchOS.

Several existing Intents classes have been marked as unavailable in watchOS in
the headers in Xcode 10 beta 1, and corresponding tests are now failing.

So obsolete the managed wrapper types, and fix tests accordingly.

* Fix xtro wrt previous Ietents/intro changes

* [tests] Minor adjustments to mtouch tests to work with Xcode 10.

* [msbuild] Update tests to cope with additional files produced by the Core ML compiler.

* [msbuild] Xcode 10 doesn't support building watchOS 1 apps, so show a clear error message explaining it.

Also update tests accordingly.

* [coreimage] Stub new filters and exclude ?removed? ones from tests

* Update GameplayKit and SpriteKit NSSecureCoding _upgrade_ and fix other non-public cases (in tests)

* [tests] Ignore some GameKit selectors that don't respond anymore (but seems to be available, at least in header files)

* [tests] Fix intro 32bits testing for filters resutls

* [msbuild] Slightly change error message to be better English.
2018-06-08 18:45:24 -07:00
Zoltan Varga 7e005b8f00 [builds] Add a --disable-packaged-llvm configure option to enable building LLVM from source. (#4050) 2018-05-09 10:57:23 +02:00
Zoltan Varga 4ccd448205 Remove the llvm submodule, its now managed by mono. (#4048) 2018-05-08 14:54:34 +02:00
Bernhard Urban 394117885c
[runtime] add support for mono runtime interpreter (#3058)
* [runtime] build interp-, icalltable- and ilgen libraries so they can be consumed in interpreter configuration

* [mtouch] add --interpreter configuration support

* [xharness] Add support for removing defines from cloned project files.

* [xharness] Run monotouch-test, mscorlib and mini tests with the interpreter too.

They're ignored for now, which means we won't run them on the bots.

* [mtouch] We're using dlsym when using the interpreter.

* [xharness] enable mini regression tests with interpreter on CI
2018-05-04 23:59:31 +02:00
Rolf Bjarne Kvinge ca657a9322
[builds] Try to fix a makefile infinite loop by using real files as dependencies. (#3951) 2018-04-18 18:27:52 +02:00
Sebastien Pouliot 5392cb8b9a Remove more usage of mcs across the build and tests (#3815)
* Remove more usage of mcs across the build and tests

* Fix -o[ut] mcs/csc argument difference

* Fix OpenTK.[dll.mdb|pdb]

* Complete some MCS|CSC renames

* Fix SYSTEM_CSC not to have a default option since it's not usable that way in every case (and most of them already deal with that option)

* Do not rename a variable used by mono itself

* Un-renamed two other variables

* Fix copying pdb

* Generate debug symbols for *.BindingAttributes.dll and copy .mdb for the old XamMac binary version

* Newer csc-compiled XamMac.BindingAttributes.dll have .pdb while the old, mcs-compiled binary cached, version has a .mdb

* Fix msc -> mcs typo.
2018-04-18 11:17:00 +02:00
Zoltan Varga 1dee418501 Revert "[builds] Switch the bcl build to the mono SDK makefile. (#3842)" (#3847)
This reverts commit a8f6bd90f9.
2018-04-03 09:14:11 +02:00
Zoltan Varga a8f6bd90f9
[builds] Switch the bcl build to the mono SDK makefile. (#3842)
* [builds] Switch the bcl build to the mono SDK makefile.

* Be quiet
2018-04-02 23:14:25 -04:00
Zoltan Varga 864091d337
Switch the mono device/simulator/cross compiler builds to the mono SDK makefile. (#3640)
* Switch the mono	device/simulator/cross compiler	builds to the mono SDK makefile.

* Build	   these by recursing into     external/mono/sdks/builds and calling the targets there.
* Add a	   few extra rules    to build dependencies like llvm	 and mono's configure to avoid
  these	   being build in parallel     by the SDK makefile.
* Copy config.h/eglib-config.h into builds/install so the build	in runtime/ doesn't have
  to add the builddirs to its includes.

* [builds] Fix install-llvm32 target, make command quiet.

* [builds] Link the libraries in runtime/ against the installed libmono, so there is no need to run install_name_tool on them.

* [builds] Fix up the rpath correctly for libmono-profiler-log.dylib.

* [builds] Update to the new ios sdk targets (-release suffix).

* Bump mono.

* Bump mono.

* [[builds] Update to the new ios sdk targets (-release suffix).
2018-03-22 21:25:00 -04:00
Zoltan Varga 7c88610112 Remove the tvos cross compiler, use the normal ios cross compiler instead, they are the same. (#3492) 2018-02-16 10:45:22 +01:00
Manuel de la Pena 8ed3f85c07
[Debugger] Allow to step into Xamarin code. (#1663)
* [Debugger] Allow to step into Xamarin code.

The tool now detects the different sources and mangles the path to
ensure that the correct paths are installed in the following location:

/Library/Frameworks/Xamarin.iOS/Versions/Current/src
/Library/Frameworks/Xamarin.Mac/Versions/Current/src

The tool will detect if the path map command was used in the mdb and pub files, will point to the correct source code and will copy it to the installation dir. 

Tests have been added that will be ran both by wrench and jenkins ensuring that changes in the manglers do not change it behaviour.
2017-12-05 14:13:59 +01:00
Bernhard Urban 20182800a1
[runtime] integrate mono 2017-10 (#2905)
* Update the function name used to initialize libmono-profiler-log, its called mono_profiler_init_log () now.

* [builds] Pass --with-cross-offsets= to crosstv's configure.

* Bump mono to 2017-08.

* Bump mono to 2017-08.

* Force disable 'futimens' and 'utimensat' so that we build with Xcode 9.

This is also needed to build with Xcode 8.3 on High Sierra.

* Remove old AppleTls implementation.

* Bump mono.

* Bump mono to 2017-08.

* Bump mono to 2017-08

* Reenable link-keep-resources-2 test

- This reverts commit 76b759ef22.
- 2017-08 has linker fix

* Bump mono to 2017-10

* Revert "Bump mono to 2017-10"

This reverts commit bb7832724e.

* Bump system mono to 2017-10

* Bump embedded mono to 2017-10

* [runtime] reflect eglib move

9be68f8952

* bump mono

* [btouch] remove Security.Tls usage from test

* [mtouch tests] update the function name used to initialize libmono-profiler-log, its called mono_profiler_init_log () now.

see
ea4e4a9ef6

fixes:

```
1) Failed : Xamarin.MTouch.Profiling(tvOS)
  _mono_profiler_startup_log
  Expected: collection containing "_mono_profiler_startup_log"
  But was:  < "_mono_profiler_init_log" >
at Xamarin.MTouch.Profiling (Xamarin.Profile profile) [0x00106] in <511889694a624cc9a50e0e9b259b05c5>:0

2) Failed : Xamarin.MTouch.Profiling(watchOS)
  _mono_profiler_startup_log
  Expected: collection containing "_mono_profiler_startup_log"
  But was:  < "_xamarin_get_block_descriptor", "_mono_profiler_init_log" >
at Xamarin.MTouch.Profiling (Xamarin.Profile profile) [0x00106] in <511889694a624cc9a50e0e9b259b05c5>:0
```

* [mmptest] update log profiler options.

826558a4af
deprecated the dash prefix for the mlpd path.

`noallocs` or `nocalls` are not needed, neither of them are default anymore.

* [mmptest] fix link-keep-resources-2 test to cope with more corlib resources.

another corlib resource (mscorlib.xml) was added:

https://github.com/mono/mono/commit/11e95169e787#diff-2d1c64decd91d9a6e8842ab0f0e9438d

* Revert "[mmptest] fix link-keep-resources-2 test to cope with more corlib resources."

This reverts commit 350eb3c174.

* [XHarness] Add the Mono.Data.Tds tests.

* Address comments from rolf in the review.

* [mmp regresssion tests] bump mono linker, so mscorlib.xml gets stripped

the test was failing in that way:

> Executing link-keep-resources-2...
> [FAIL]	i18n 4/2 data files present: charinfo.nlp, collation.core.bin, collation.tailoring.bin, mscorlib.xml

also update the output, because it's actually expected at least three
elements.

fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=59277

* bump mono

fixes crash in tvOS: https://github.com/mono/mono/pull/5812

* bump mono for updated BCL tests

see https://github.com/mono/mono/pull/5820

* [mono] set 2017-10 branch in .gitmodules

* [macos] Fix guiunit error on clean builds by depending on correct copy (#2912)

* [macos] Fix guiunit error on clean builds by depending on correct copy

- From a clean build making a BCL test would error due to the non-mobile guiunit not being built
- This was because the Makefile-mac.inc target was incorrect
- This was because xharness assumed that non variation based targets were always Modern
- However, BCL tests are Full, not Modern

* Code review change

* Swap to var to reduce diff

* Revert changes in the paths for GuiUnit.

* [XHarness] Add the System.IO.Compression bcl tests. (#2918)

* [XHarness] Add the System.IO.Compression bcl tests.

*  [XHarness] Add bcl tests for System.IO.Compression.FileSystem. (#2924)

* [XHarness] Add the System.IO.Compression bcl tests.

* Ensure that resources are correctly copied in the bundles.

* [XHarness] Add bcl tests for System.IO.Compression.FileSystem.

* As per review, make the Mac test app name match the tests that are ran.

* [XHarness] Add Mono.CSharp tests on ios. (#2927)

* [XHarness] Add Mono.CSharp tests on ios.

* Bump mono to bring changes in the mono.csharp tests.

* [xtro-sharpie] fix TypeDefinition access due to Cecil change

* Bump mono

* bump mono

fixes
- https://bugzilla.xamarin.com/show_bug.cgi?id=60480
- https://bugzilla.xamarin.com/show_bug.cgi?id=60482

* bump mono

more fixes around conflicting paths when tests are run in parallel.

* Bump for mono/mono@2017-10
2017-11-14 21:30:08 +01:00
Bernhard Urban abbd2b7200 [runtime] disable interpreter (#2962)
it's going to be default in mono once
https://github.com/mono/mono/pull/5925 is merged
2017-11-10 15:17:03 -05:00
Alexander Köplinger eb35aaaa38 Cleanup disabled Mono profiles for configure (#2836)
profile2, profile4 and profile4_5 were removed a long time ago, there's only profile4_x nowadays.
2017-10-04 07:21:17 +02:00
Rolf Bjarne Kvinge cd542a0845 [generator] Remove non-IKVM code. (#2769) 2017-09-25 14:37:51 -04:00
Sebastien Pouliot 05eb96d0a7 Merge branch 'xcode9' into xcode9-master-merge 2017-09-15 11:05:30 -04:00
Ludovic Henry 8178ecc5ea Bump mono to 2017-06 (#2595) 2017-09-05 14:48:09 -04:00
Rolf Bjarne Kvinge 656249cf32 [builds] Tell LLVM to stay away from newer macOS functions. (#2459)
Fixes this build problem on Sierra:

> ld: weak import of symbol '_futimens' not supported because of option: -no_weak_imports for architecture x86_64

This is a symbol that was (will be?) introduced in High Sierra.

Interestingly this only occurs if the Xcode 8.X Command Line Tools haven't
been manually installed.

Because if the Xcode 8.X Command Line Tools are installed, this happens:

1. llvm's configure script detects that 'futimens' is not usable.

2. llvm's configure script detects that 'futimens' is not usable, because
   xcrun sets SDKROOT=/ when calling clang.

    a. When the SDKROOT variable is set, clang passes '-syslibroot /usr/lib'
       to ld.
    b. When ld gets '-syslibroot /usr/lib', ld looks in '/usr/lib' for a
       library that contains 'futimens' in the OS itself, and since we're on
       Sierra, that fails to link.
    c. So when llvm's configure script creates a test program that checks if
       'futimens' is present, the program fails. This is correct, and makes
       llvm *not* use futimens.

3. xcrun sets SDKROOT=/ because /usr/share/current-os.sdk/Info.plist exists.
   If that file does not exist, then xcrun sets SDKROOT to Xcode9's macOS SDK
   (because that's what xcode-select reports).

    a. When SDKROOT is set to Xcode9's macOS SDK, the configure check for
       'futimens' succeeds, because the macOS 10.13 SDK contains that
       function.
    b. llvm happily uses 'futimens', and then the final link fails because
       we're using a symbol not available on all target platforms.
2017-08-09 17:50:06 +02:00
Rolf Bjarne Kvinge 0b0a203829 Force disable 'futimens' and 'utimensat' so that we build with Xcode 9. (#2446)
This is also needed to build with Xcode 8.3 on High Sierra.
2017-08-08 08:01:59 +02:00
Vincent Dondain 24cd73a5ca Bump to Xcode 9 (#2176)
- Update Versions-ios and Versions-mac file too.
- Bump maccore and maciostools to the xcode9 branch.
- [builds] Force disable 'futimens' and 'utimensat' so that we build with Xcode 9.
- [builds] 'system' is not available on iOS (simulator).
- [runtime] Fix: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
    - Prevented building xcode9 branch, see: https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/3886/console
  ```
  runtime.m:1122:9: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
                              char *last_sep = strrchr (info.dli_fname, '/');
  ```

- [registrar] Apple removed a header, so don't include it anymore.
- [mtouch] Don't run the partial static registrar for tvOS.
  The generated output doesn't compile because Apple forgot to ship headers for
the ExternalAccessory framework in their tvOS simulator SDK.
2017-06-06 16:21:26 -04:00
Rolf Bjarne Kvinge bc065debe9 Create and ship .dSYMs for our dylibs and frameworks. (#2155)
We already create dSYMs for Mono.framework when apps are built, but this will
now become redundant and removed at a later stage. This will make app builds
slightly faster (yay) at the cost of a somewhat bigger XI package (and our
build will be equivalently slower).

We never created dSYMs for libmonosgen-2.0.dylib, which means that anybody
symbolicating crash reports will now get file name and line number information
in stack traces (it also makes debugging using lldb possible).
2017-06-02 17:25:53 +02:00
Andi McClure a6cf8c5edc [Do not merge yet] Update to mono 2017-04 branch (#1960)
* Update to mono 2017-04 branch

* Patch from Zoltan to fix build error with CppSharp.CppParser.dll

* Include new linker files in Makefile, based on mareks commit

* [msbuild] Fix running bgen for Xamarin.Mac.

bgen must be executed with the system mono, not bmac-mobile-mono, and without
the MONO_PATH variable set.

* System.Data tests should act as if they are running on mobile profile

* Add --runtime=mobile to mono flags in Modern

* Move runtime launcher options up

* System.Data tests should use Mobile profile (mac fix)

* Bump 2017-04 to pick up AOT and assembly resolution fixes

* Build fixes for netstandard.dll and System.Drawing.Primitives.dll

The new handling went in with https://github.com/mono/mono/pull/4501.

I also noticed that WatchOS was missing a target for System.Drawing.Primitives.dll, so I added that.

* Add netstandard.dll to 2.1/Facades and System.Drawing.Primitives.dll to WatchOS

* Fix 2.1/Facades/netstandard.dll build

* Fix the netstandard targets

* Bump mono to latest 2017-04 commit

* [xharness] Fix adding defines to csproj by correctly detecting existing defines.

* Bump mono to latest 2017-04 commit

* [mtouch] Update csproj with new files.

* [mtouch] Improve reporting for MarkExceptions from the linker.

* Bump mono to latest 2017-04 commit

* Bump mono to pick up latest 2017-04 branch commit (Fixes #55436)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55436

* Add a missing Makefile dependency

* Chris Hamons patch to apply --runtime=mobile as necessary at AOT time

(It is currently being applied for some configurations at runtime only)

* Bump system mono

* Bump mono for assembly loader changes

* Bump system mono

* Update assemblies list as some where moved to facades

6ca5ec442b
c38e4d9220

* Bump mono to latest 2017-04 commit

* Add another new facade

* Bump mono to tip of 2017-04.

* Bump mono to tip of 2017-04.

* [tests][mtouch] Adjust tests to cope with fewer assemblies being included in linked apps. Fixes #56307 and #56308.

System.dll is now completely linked away unless the app actually uses any
System.dll API.

This is the change that caused this to change: 4960d5d2a2

Previously the following types would always be kept by the linker:

```
$ monodis --typedef System.dll
Typedef Table
1: (null) (flist=1, mlist=1, flags=0x0, extends=0x0)
2: ObjCRuntime.INativeObject (flist=1, mlist=1, flags=0xa0, extends=0x0)
3: Mono.Net.CFObject (flist=1, mlist=2, flags=0x100000, extends=0x5)
4: Mono.Net.CFArray (flist=4, mlist=19, flags=0x100, extends=0xc)
5: Mono.Net.CFNumber (flist=5, mlist=32, flags=0x100100, extends=0xc)
6: Mono.Net.CFRange (flist=5, mlist=41, flags=0x100108, extends=0x25)
7: Mono.Net.CFString (flist=7, mlist=42, flags=0x100100, extends=0xc)
8: Mono.Net.CFData (flist=8, mlist=53, flags=0x100100, extends=0xc)
9: Mono.Net.CFDictionary (flist=8, mlist=63, flags=0x0, extends=0xc)
10: Mono.Net.CFMutableDictionary (flist=10, mlist=75, flags=0x100100, extends=0x24)
11: Mono.Net.CFUrl (flist=10, mlist=80, flags=0x100100, extends=0xc)
12: Mono.Net.CFRunLoop (flist=10, mlist=83, flags=0x100100, extends=0xc)
13: Mono.Net.CFBoolean (flist=10, mlist=94, flags=0x100, extends=0x5)
14: Mono.AppleTls.SecCertificate (flist=13, mlist=106, flags=0x100100, extends=0x5)
15: Mono.AppleTls.SecIdentity (flist=14, mlist=122, flags=0x100, extends=0x5)
16: Mono.AppleTls.SecIdentity/ImportOptions (flist=19, mlist=134, flags=0x100105, extends=0x5)
17: Mono.AppleTls.SecKey (flist=19, mlist=134, flags=0x100100, extends=0x5)
18: Mono.AppleTls.SecStatusCode (flist=21, mlist=141, flags=0x100, extends=0x69)
19: Mono.AppleTls.SecTrustResult (flist=395, mlist=141, flags=0x100, extends=0x69)
20: Mono.AppleTls.SecImportExport (flist=404, mlist=141, flags=0x100100, extends=0x5)
21: Mono.AppleTls.SecImportExport/<>c (flist=404, mlist=144, flags=0x102103, extends=0x5)
22: Mono.AppleTls.SecPolicy (flist=406, mlist=147, flags=0x100100, extends=0x5)
23: Mono.AppleTls.SecTrust (flist=407, mlist=154, flags=0x100100, extends=0x5)
24: System.Security.Cryptography.OidGroup (flist=408, mlist=174, flags=0x101, extends=0x69)
25: System.Security.Cryptography.Oid (flist=420, mlist=174, flags=0x100101, extends=0x5)
26: System.Security.Cryptography.CAPI (flist=423, mlist=176, flags=0x100180, extends=0x5)
27: System.Security.Cryptography.AsnEncodedData (flist=423, mlist=178, flags=0x100101, extends=0x5)
28: System.Security.Cryptography.X509Certificates.X509Utils (flist=424, mlist=179, flags=0x100100, extends=0x5)
29: System.Security.Cryptography.X509Certificates.PublicKey (flist=424, mlist=181, flags=0x100101, extends=0x5)
30: System.Security.Cryptography.X509Certificates.X509Certificate2 (flist=429, mlist=188, flags=0x102101, extends=0x51)
31: System.Security.Cryptography.X509Certificates.X509Certificate2Impl (flist=431, mlist=204, flags=0x100080, extends=0x55)
32: System.Security.Cryptography.X509Certificates.X509CertificateCollection (flist=431, mlist=209, flags=0x102101, extends=0x6d)
33: System.Security.Cryptography.X509Certificates.X509CertificateCollection/X509CertificateEnumerator (flist=431, mlist=212, flags=0x100102, extends=0x5)
34: System.Security.Cryptography.X509Certificates.X509Helper2 (flist=432, mlist=217, flags=0x100180, extends=0x5)
35: <PrivateImplementationDetails> (flist=432, mlist=218, flags=0x100, extends=0x5)
36: <PrivateImplementationDetails>/__StaticArrayInitTypeSize=9 (flist=433, mlist=219, flags=0x113, extends=0x25)
```

Some of the above types from System.dll implemented ObjCRuntime.INativeObject
(from System.dll), which our linker detected as implementing
ObjCRuntime.INativeObject (from Xamarin.iOS.dll), so these types were treated
as custom NSObject subclasses, and the MarkNSObjects linker step would mark
them (which would in turn cause all the other types in the list to be marked).

With that change, these types now implement ObjCRuntimeInternal.INativeObject,
and the linker does not treat them as custom NSObject subclasses anymore.

I think the new behavior is correct: these types do not actually inherit from
the real NSObject/INativeObject, so the linker should not treat them as such.

This may run into different bugs because the linker might now remove more
stuff than before, but that would be a different issue.

This means that the fix is to modify these tests accordingly.

https://bugzilla.xamarin.com/show_bug.cgi?id=56307
https://bugzilla.xamarin.com/show_bug.cgi?id=56308

* Bump mono to latest.

* Fix merge conflict that was missed

* [mtouch] Renumber new error which clashes with an existing error number in master.
2017-05-29 18:39:29 +02:00
Rolf Bjarne Kvinge 0a47a8ce0c Patch from Zoltan to fix build error with CppSharp.CppParser.dll (#1967) (#1986) 2017-04-11 15:01:57 +02:00
Rolf Bjarne Kvinge bbbe881747 Fix how we build frameworks. Fixes #53813. (#1952)
Previously we copied any equivalent .dylib and ran install_name_tool on the
library to change the library id to make it a framework.

Unfortunately this does not work when the library contains bitcode, because
bitcode embeds linker flags (-install_name for instance), and
install_name_tool does not change those linker flags.

This means that we need to create frameworks by linking with the proper
arguments, since it's much more difficult to fixup the embedded bitcode linker
flags as well.

So change how be build Mono.framework, Xamarin.framework, and any frameworks
built from assemblies to:

* Always link instead of fixup a dylib. For Mono.framework this means
  extracting all the object files from libmonosgen-2.0.a and linking those,
  for Xamarin.framework this means linking the object files we've already
  built.

* Make sure the library is correctly named when linked (once again: bitcode
  contains embedded linker flags, so renaming the executable later breaks
  stuff as well).

I've also extracted the logic that creates Mono.framework from
libmonosgen-2.0.a to a separate shell script, to deduplicate this logic.

This required a minor change in the mono builds: we need the Mono.framework
when building the `all` target, so make sure that happens.

https://bugzilla.xamarin.com/show_bug.cgi?id=53813
2017-04-03 11:52:29 +02:00
Rolf Bjarne Kvinge b568b2541e [builds] Improve mono/llvm dependencies. (#1948)
* [builds] Improve mono/llvm dependencies.

* Create a list of all the files in the mono and llvm repositories, and save
  these lists as a Make variable (in a generated Makefile - .deps.*.mk). We
  don't list _all_ the files in each repository, because there are quite a few
  (55k for mono), and Make measurably takes a while to check all of them, so
  try to limit it to a sane subset, without risking missing changes to files
  that actually matters.

* Always create stamp files when we're done with mono builds.

* Modify the mono/llvm builds to depend on all the files in their
  repositories.

* Explicitly list the corresponding .stamp-build-* files as dependencies for
  various files that are produced by the mono builds, so that make knows how
  to build these files.

* Rewrite the *-facade-check targets to depend on the corresponding
  *_BCL_TARGETS, so that we can avoid running a submake to the same Makefile
  to execute the facade checks.

  It now takes a little while (less than a second on my machine, which is
  fine) for make to list all dependencies and get their timestamps, but if
  executing multiple submakes this adds up to a multi-second timewaste.

  So avoid the timewaste by not doing submakes, but instead use dependencies
  to enforce the required target execution ordering.

* Don't depend on nicely named intermediate targets, since won't prevent
  rebuilds:

      build-cross64: setup-cross64

  Since the `setup-cross64` file doesn't exist, `build-cross64` will always
  execute. Instead depend on the stamp file:

      build-cross64: .stamp-configure-cross64

  And now `build-cross64` will only rebuild if needed.

* Don't try to list all intermediate files as .SECONDARY dependencies, instead
  list none at all, which works as if all files were listed as dependencies.

* Some targets had to move later in the file, since variables used in dependencies:

       foo: $(VARIABLE)

  must be defined before that point in the file, as opposed to variables used in recipes:

       foo:
           $(MAKE) $(VARIABLE)

  can be defined anywhere in the Makefile.

* Simplify the targets that sign assemblies significantly.

There are a few end results:

* It's now possible to do `make install`, without doing `make all` first. This
  might seem weird, but that also ensures the more common `make all install`
  works properly.

* Remakes (without any mono/llvm changes) in build/ are much faster, because
  we now won't recurse into every mono build:

      $ time make all -C builds/ -j8
      [...]
      real  0m1.873s

  This even means that we might be able to make it a habit to remake in the
  root directory, which doesn't take forever now:

      $ time make all -j8
      [...]
      real  0m4.521s

  Unfortunately adding `make install` to the mix still does some useless
  stuff, and it ends up taking ~30 seconds to complete a full build:

      $ time make all install -j8
      [...]
      real  0m32.542s

* [msbuild] Don't verify the xml syntax of targets files unless the files change.

* [build] Don't depend on installed files.

Don't depend on installed files, because that causes a rebuild when installing
to a different directory (i.e. package creation).

* Bump maccore to get build improvements.

Rebuilds are now very fast:

    $ make all install -j8
    $ time make all install -j8
    real	0m5.735s

Less than 6s to figure out that nothing needs to be done.

And strangely flushing the disk cache doesn't make it much slower:

    $ sudo purge
    $ time make all install -j8
    real	0m7.309s

Which probably means that Make mostly reads file metadata, and not actual file
contents (which is good).
2017-03-31 20:23:38 +02:00
Marek Safar 105ee26509 Merge remote-tracking branch 'origin/master' into mono-2017-02 2017-03-23 23:13:43 +01:00
Marek Safar 6906d8948e Remove mdbrebase which is no longer needed (compiler does it now) 2017-03-14 11:51:08 +01:00
Marek Safar 16ba9f1452 [build] Update debug symbols to pdb 2017-03-14 11:47:06 +01:00
Marek Safar 398935db61 Bump mono 2017-03-14 11:47:06 +01:00
Marek Safar 1e77e19aa1 Remove 4.x profile dependency 2017-03-14 11:47:06 +01:00
Marek Safar 1f606b58b3 Replace mdbrebase tool with pathmap and fix broken debug symbols mapping in public builds 2017-03-14 11:47:06 +01:00
Marek Safar 6a20abca76 [build] Profiles cleanup 2017-03-14 11:47:06 +01:00
Rolf Bjarne Kvinge b7794b0eb7 [builds] Don't install mono binaries for the generator if we're using the IKVM-based generator. 2017-03-09 12:47:57 +01:00
Rolf Bjarne Kvinge 743a45456d [builds] Fix mdb permissions. Fixes #52113. (#1605) 2017-02-01 10:47:46 +01:00
Manuel de la Pena d7a9bd462a [Debugger] Ensure that we use the correct paths in the mono mdb files (#1554)
* [Debugger] Ensure that we use the correct paths in the mono mdb files to be able to step into the mono code.

Fixes bug 51530.

* Make the mdb paths to be correct in other platforms.

* Ensure mdb paths are also correct in XM.
2017-01-25 13:17:02 +01:00
Rolf Bjarne Kvinge 3dac0bae81 Use @rpath instead of @executable_path in dylibs. (#1552)
Use @rpath instead of @executable_path in dylibs, since it allows us to be
more flexible when placing dylibs in the app.

In particular with this change it's trivial to put libmonosgen-2.0.dylib in
the container app, and reference it from extensions.
2017-01-24 20:24:32 +01:00
Rolf Bjarne Kvinge 0a07b6ba8e Remove unnecessary bitcode from dylibs. Fixes #51352 (#1469)
This is a series of fixes to the dynamic libraries we build / create to remove
any unnecessary bloat (unused architectures, bitcode).

A brand new watchOS app with no changes goes from 35MB to 11MB with these
fixes (with incremental builds disabled, the app size is 10MB).

--------------------------------------------------------------------------------

* [runtime] Split list of architectures into simulator and device-specific lists.

* [runtime] Build separate dylibs for device and simulator.

Build separate dylibs for device and simulator, since we already install these
into different locations.

This makes both the simulator and device builds slightly faster (since the
respective dylibs are smaller, and less data to copy around).

For watchOS apps, this saves ~430kb.

* [runtime] Strip bitcode from dylibs. Fixes #51352.

We know that dylibs will never be shipped to the App Store, so we'll never
need them to have bitcode.

So just strip the bitcode from all our dylibs, since this makes apps with
fastdev significantly smaller (and thus much faster to upload to watch
devices).

For watchOS apps this is a very significant improvement: a branch new watchOS
app without any changes goes from 35MB to 17MB.

https://bugzilla.xamarin.com/show_bug.cgi?id=51352

* [mtouch] Fix dylib compilation to not embed full bitcode.

Facts
=====

a. The output from the AOT compiler is an assembly (.s) file.
b. Clang's assembler does not support -fembed-bitcode-marker (only -fembed-
   bitcode), so when we ask clang to -fembed-bitcode-marker, the assembler
   receives a -fembed-bitcode argument.
c. This means that the assembled object file does not contain the
   __LLVM/__bitcode and __LLVM/__cmdline sections (it does however contain an
   __LLVM/__asm section).
d. The native linker will create a bitcode assembly section if none of the
   object files passed to the linker contain a __LLVM/__bitcode section and
   there's an __LLVM/__asm section present.
e. The end result is that when we build to a dylib, we end up (unexpectedly,
   because we ask Clang to -fembed-bitcode-marker) including both armv7k and
   bitcode in the dylib, thus bloating the dylib size significantly.

Solution
========

We manually add the __LLVM/__bitcode and __LLVM/__cmdline sections to the .s
file Mono's AOT compiler generated. This way the .o file will have the magic
sections, and the linker will not include bitcode (only the bitcode marker) in
the final library.

An empty watchOS extension with incremental builds is now 6MB smaller (down
to 11MB from 17MB).
2017-01-16 12:32:06 +01:00
Chris Hamons ffe142d0b5 [XM] AOT support in Xamarin.Mac (#1340) 2017-01-11 14:10:39 -06:00
Rolf Bjarne Kvinge 3cf0eb89d1 [builds] Rely on the mono repo automatically cloning the binaries for the offset tool. (#1215) 2016-11-18 12:32:51 +01:00
João Matos ab5cf5cafd [cross] Bump Mono and update the AOT cross offsets generation paths. (#1176)
Following https://github.com/mono/mono/pull/3927 this needs to be updated to work with latest Mono revisions.
2016-11-11 14:24:47 -05:00
Sebastien Pouliot 742f85ff5a Ensure BoringTLS is not build (by default) in any configuration for XI and XM (no trace in logs) (#957) 2016-10-06 12:56:17 -04:00
Rolf Bjarne Kvinge c0255c2d49 Try to make the watch build parallel safe. (#949)
We need to build the watch profile in tools64 now, since we don't have
a separate watch-mono repository anymore.
2016-10-05 20:20:53 +02:00
Rolf Bjarne Kvinge 1d54c461b0 Remove the watch-mono repository, and use a single mono repository. (#941)
Still keeping some of the logic so that it's easy to switch back if we wish
to.
2016-10-05 16:21:01 +02:00
Chris Hamons 642173828e [XM] Disable blts on XM since we don't ship it (#946) 2016-10-04 21:31:56 -04:00
Rolf Bjarne Kvinge c4f4056b22 Bump [watch-]mono to get more API removal for watchOS. 2016-10-03 18:31:04 +02:00
Rolf Bjarne Kvinge 46b9a5bfbf [builds] Apply magic to make us build on Sierra. (#911)
* Pass -Wl,-no_weak_imports to the linker so that   we don't accidentally use
  symbols weakly. This would   cause problems on older OSes where the symbol
  isn't there, because our code is not prepared to deal with weakly linked
  symbols.

* Manually disable fstatat and readlinkat (introduced with Xcode 7 in iOS 8 /
  macOS 10.10), found by the above.

* Manually disable __thread support for a few targets, since mono's configure
  script doesn't properly detect it's not supported.

* Manually disable clock_nanosleep, since mono's configure script doesn't
  properly detect it's not supported.
2016-09-28 20:27:10 -04:00
Martin Baulig f3501d99af Remove Mono.Security.Providers.*.dll in preparation of their upcoming removal from the BCL. 2016-09-22 07:23:40 +02:00
Zoltan Varga 6d174b4fc1 [builds] Pass --with-llvm to the cross compile build's configure instead of adding llvm's bin directory to the PATH. (#862) 2016-09-20 20:34:05 -04:00
Chris Hamons e3863afb30 [XM] Enable System.Numerics.Vector assembly (#850)
- Bump mono to get 377041fd6e
2016-09-19 16:43:58 -04:00
Rolf Bjarne Kvinge fd47ae889f [builds] Don't install symlinks to iOS/Classic assemblies in the iOS/Unified profile. (#844)
* [builds] Don't install symlinks to iOS/Classic assemblies in the iOS/Unified profile.
* [fsharp] Don't install symlinks to iOS/Classic assemblies in the iOS/Unified profile.

The symlinks won't quite work once we remove the iOS/Classic assemblies.
2016-09-16 20:02:25 +02:00
Sebastien Pouliot 38148c718a Merge branch 'xcode8' 2016-09-09 15:29:37 -04:00
Rolf Bjarne Kvinge e5bdbdd1ac Allow profiling + incremental builds on bitcode-capable targets again. (#706)
Mono bug [#41428](https://bugzilla.xamarin.com/show_bug.cgi?id=41428) has been fixed now,
which means we have profiler dylibs again, so we can enable profiling + incremental builds again.
2016-08-30 11:39:29 +02:00
Chris Hamons b401d4eadb Build System.Security for XM Mobile (#450)
- Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42692
2016-08-18 09:47:15 -05:00
Alexander Köplinger 59125e6f9c [C8] Bump to latest Mono 4.6.0 commit (#602)
* [C8] Bump to latest Mono 4.6.0 commit

Brings in the netstandard updates from https://github.com/mono/mono/pull/3394
We also had to add a new assembly System.IdentityModel.dll to the mobile profiles while doing that work.

* Add System.IdentityModel to Sdk assemblies

Fixes the following mtouch test failure:

```
Xamarin.Linker.SdkTest.iOS_Classic :   BCL
  Expected:
  But was:  < "System.IdentityModel" >

at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message, System.Object[] args) <0x47bec88 + 0x00047> in :0
at NUnit.Framework.CollectionAssert.IsEmpty (IEnumerable collection, System.String message) <0x47bec58 + 0x0001f> in :0
at Xamarin.Linker.SdkTest.BCL (System.String path) <0x47bccf0 + 0x003f3> in :0
at Xamarin.Linker.SdkTest.iOS_Classic () <0x47bcc50 + 0x0001b> in :0
```
2016-08-16 15:09:59 -04:00
Alexander Köplinger 834b46a5f6 Bump to latest Mono 4.6.0 commit (and master for watch) (#601)
Brings in the netstandard updates from https://github.com/mono/mono/pull/3394
We also had to add a new assembly System.IdentityModel.dll to the mobile profiles while doing that work.
2016-08-12 14:50:10 -04:00
Alexander Köplinger ba278764e6 Only use files ending in .dll for Facades check (#559)
Since eaf2ceb532 there can be .dll.mdb files
for Facades as well which broke the Facades check.

The fix is to only include files ending in .dll and ignore the others.
2016-08-05 20:14:57 +02:00
Zoltan Varga 2f0c5d0b40 [builds] Add a 'install-device' target to match the other 'device' targets. 2016-08-02 20:34:12 -04:00
Marek Safar 68c21e3174 [build] Update facades script to include correct names 2016-07-22 11:48:38 -04:00
Aleksey Kliger 23f5280276 Revert "Revert "Merge pull request #416 from marek-safar/cycle8-new-assemblies""
This reverts commit 8305bca6bd.
2016-07-21 17:27:55 -04:00
Chris Hamons 900d13c13f Build System.Security for XM Mobile (#451)
- Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42692
2016-07-21 09:05:57 -05:00
Alexander Köplinger c50322f4dc [build] Update list of installed assemblies (#430)
(cherry picked from commit 1edab27b38)
2016-07-19 18:53:32 +02:00
Rolf Bjarne Kvinge fed6b450e4 [builds] Fix symlinks from Unified facades to Classic facades. (#424)
Instead of having a symlink of the entire Facades directory for
Unified, we must now create a real directory and symlink each Facade
assembly, because there's one Facade assembly that can't be shared
between Unified and Classic (System.Drawing.Primitives.dll) because
it references monotouch.dll/Xamarin.iOS.dll.
2016-07-19 11:12:00 +02:00
Sebastien Pouliot 8305bca6bd Revert "Merge pull request #416 from marek-safar/cycle8-new-assemblies"
This reverts commit 950a4badfd, reversing
changes made to 4ba36fc88d.

Incomplete port that breaks the build.
2016-07-18 21:14:38 -04:00
Marek Safar 1edab27b38 [build] Update list of installed assemblies 2016-07-18 07:21:36 -07:00
Marek Safar a48b3001ab [build] Update facades script to include correct names 2016-07-14 14:54:23 +02:00
Rolf Bjarne Kvinge 834c0a9fd7 Build with path to the exact SDK version. Fixes #41597. (#244)
If no sdk version (-sdk_version) is passed to the native
linker, it tries to infer the SDK version from the
path to the -syslibroot argument.

In our case we use a versioned path to Xcode, but a general
symlink without the SDK version:

/Applications/Xcode73.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk

which means ld picked up the Xcode version as the SDK version,
since that's the first number part of the path [1], so we'd
end up with libraries whose SDK version was 73.

So instead use an SDK path with the SDK version, so that ld
finds the SDK version instead of the Xcode version.

[1] 266f4401b9/src/ld/Options.cpp (L4005-L4020)

https://bugzilla.xamarin.com/show_bug.cgi?id=41597
2016-06-21 07:24:16 -07:00
Zoltan Varga 46dccaf7bc [builds] Don't pass --disable-shared-handles to mono's configure, its the default. Avoid some duplicate configure options. 2016-06-07 01:37:51 -04:00
Zoltan Varga d2300a17b2 [builds] Don't pass --enable-gsharedvt and --enable-native-types to mono's configure, they are enabled by default. 2016-06-07 01:35:58 -04:00
Zoltan Varga e3b219bc71 [builds] Disable the building of libmono-profiler-log.dylib on tvos as well. 2016-05-30 19:50:41 -04:00
Rolf Bjarne Kvinge 27402f8142 [builds] Avoid looking for libmono-profiler-log.dylib when bitcode is enabled, its not built anymore on mono master. (#95) 2016-05-27 17:46:06 +02:00
Rolf Bjarne Kvinge 16824dd40f [builds] Enable checked builds for watchOS for now, to make it easier to track down failures. 2016-05-26 17:47:10 +02:00
Rolf Bjarne Kvinge d48d7c2e11 [configure] Add option to disable device-related parts of the build. (#67)
And use it when building on jenkins.
2016-05-19 14:33:35 +02:00
Rolf Bjarne Kvinge 65c50daf22 [builds] Use the mono from watch-mono repo for bwatch-mono. (#64)
* [mk] Add watch-mono to the check-versions and reset-versions targets.

* [builds] Use the mono from watch-mono repo for bwatch-mono.
2016-05-18 19:33:04 +02:00
Rolf Bjarne Kvinge 71b04db2ed [builds] There's no libmono-profiler-log.dylib anymore on watchOS.
Mono disabled building the log profiler as a dynamic library [1],
so don't try to install it.

[1] cfd9870f83
2016-05-16 13:44:03 +02:00
Rolf Bjarne Kvinge a7f2dd54b5 [builds] Use libmono-profiler-log-static.a instead of libmono-profiler-log.a.
This was already done for iOS device builds [1], this does the same thing for
all the other builds (simulator, tvOS, watchOS).

[1] f773a69bed
2016-05-16 13:42:23 +02:00
Rolf Bjarne Kvinge 69fe27aafa [builds] Build tools64 completely before watchbcl.
watchbcl uses mdb rebase from tools64, but adding a more "correct"
dependency when the mdb rebase occurs causes tools64 to be built
twice simultaneously (probably because we use submakes, so a different
make process also tries to build tools64).

So instead use a bigger hammer and just build tools64 completely
before building watchbcl.
2016-05-16 13:39:17 +02:00
Rolf Bjarne Kvinge d42474098f [builds] Use the right aot offsets tool for watchOS. 2016-05-16 12:14:36 +02:00
Rolf Bjarne Kvinge 611b35c910 [builds] tools64 shouldn't build the watchOS BCL anymore. 2016-05-16 11:10:51 +02:00
Rolf Bjarne Kvinge 9c77afa4d7 Use the watchOS mono submodule. 2016-05-16 11:06:03 +02:00
Zoltan Varga d07463c9a7 [builds] Compile watchos runtime with bitcode flags. 2016-05-09 21:03:32 -04:00
Zoltan Varga d96a159aab [builds] Compile the watch cross compiler with cooperative gc support and make it use the proper offsets file. 2016-05-04 23:14:22 -04:00
Zoltan Varga 55b25bde4b [builds] Add a DISABLE_BUILDS_MAKEFILE_DEP Make.config.local variable which can be used to disable the rebuilding of mono trees under builds/ when builds/Makefile changes. 2016-04-25 18:15:01 -04:00
Rolf Bjarne Kvinge 24870304ba Add an optional dependency on xamarin-specific build logic. 2016-04-24 14:48:45 -04:00
Rolf Bjarne Kvinge 9ea0738c48 Add our mono runtimes to the build. 2016-04-24 14:47:24 -04:00