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

51 Коммитов

Автор SHA1 Сообщение Дата
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