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

1595 Коммитов

Автор SHA1 Сообщение Дата
Connor Adsit 8fc90c00e6
[Devops] Flag to disable Provisionator Cleanup (#8593) 2020-05-13 20:38:29 -04:00
Rolf Bjarne Kvinge 76e067b47c
[mmp] Move several static Driver properties to be instance properties on the Application instance. (#8588)
* [mmp] Put the custom bundle name in the App instance.

* [mmp] Put the AOT options in the App instance.

* [mmp] Put the DisableLldbAttach and DisableOmitFramePointer options in the App instance.

* [mmp] Remove Driver.Registrar and use App.Registrar instead.
2020-05-13 15:35:20 +02:00
Manuel de la Pena 1e78ea4d07
[Devops] Do link xcode to the expected path. (#8586) 2020-05-13 09:18:29 -04:00
Rolf Bjarne Kvinge 3e1862ada9
[mtouch/mmp] Make --setenv available to mmp as well. (#8572)
The actual implementation will be added in a later PR, when the code to
generate main is unified between mtouch and mmp.
2020-05-13 08:50:20 +02:00
Rolf Bjarne Kvinge df2b5363b9
[mtouch] Validate the abi earlier. Fixes #xamarin/maccore@2222. (#8571)
This fixes this mtouch unit test:

    Xamarin.MTouch.Architectures_TVOS_Invalid : The error 'MT0075' was not found in the output.

because now we show MT0075 ("Invalid architecture 'ARMv7' for TVOS projects.")
as expected instead of failing to locate the 32-bit platform directory for
tvOS (which doesn't exist).

Fixes https://github.com/xamarin/maccore/issues/2222.
2020-05-13 08:41:59 +02:00
Rolf Bjarne Kvinge a4910bb0fa
[mtouch/mmp] Share --package-debug-symbols. (#8574) 2020-05-13 08:40:07 +02:00
Manuel de la Pena 9f380e257e
[Devops] Move to use provisionator to get xcode. (#8570)
Move to use the provisionator and add a make file to generat the script
so that we only have to bump xcode in a single place.

Move all deps to provisionator and make provisionator download and
install the xi pkg that has been built to be tested in the pipeline, we
do not longer use curl to do it.
2020-05-12 10:59:53 -04:00
Rolf Bjarne Kvinge 570f5ad8a3
[mtouch/mmp] Rework the project files. (#8575)
* Files outside the project directory now show up with a much more logical
  name in the IDE. External files have a link target which is relative to the
  root xamarin-macios directory, and files included from the mono archive show
  up as such as well.
* Rename a few mtouch/mmp-specific files to contain 'mtouch' or 'mmp' in the
  filename, to avoid having multiple files in the projects with the same name
  (it's confusing every time you search for a filename in the IDE and get
  multiple filenames where only the directory is different).
* Add a tools.sln that contains only the mtouch and mmp projects. This makes
  it easier to work with both mtouch and mmp and the same time, while not
  making VSfM unbearably slow by loading many projects in the same solution.
2020-05-12 16:37:43 +02:00
Rolf Bjarne Kvinge 3ce9ac43d8
[mtouch/mmp] Share the mono native code. (#8564)
Also move the mono native code to the Application class from the Target
class, since it's per-Application, not per-Target.
2020-05-12 12:10:50 +02:00
Rolf Bjarne Kvinge 5193dfbf9a
[mtouch/mmp] Share --debugtrack code. (#8565) 2020-05-12 09:20:53 +02:00
Rolf Bjarne Kvinge 3d2981c130
[mtouch/mmp] Share Application.MonoGCParams. (#8566) 2020-05-12 09:20:20 +02:00
Sebastien Pouliot 6c3669f196
[mtouch] Add -d:DEBUG to .csproj Debug configuration (#8567)
otherwise debug won't work and you'll get a weird error

```
Using Xcode 11.4 (11E146) found in /Applications/Xcode114.app/Contents/Developer
Xamarin.iOS 13.21.0.154 (master): 296eabd9a using framework: /Applications/Xcode114.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk
A full rebuild will be performed because the cache is either incomplete or entirely missing.
A full rebuild has been forced because the cache for linker is not valid.
error MT2006: Can not load mscorlib.dll from: '/Users/poupou/git/master/xamarin-macios/tools/mtouch/lib/mono/Xamarin.iOS/mscorlib.dll'. Please reinstall Xamarin.iOS.

  at Xamarin.Bundler.Target.Initialize (System.Boolean show_warnings) [0x0002c] in /Users/poupou/git/master/xamarin-macios/tools/mtouch/Target.cs:275
  at Xamarin.Bundler.Application.Initialize () [0x007c2] in /Users/poupou/git/master/xamarin-macios/tools/mtouch/Application.cs:1104
  at Xamarin.Bundler.Application.BuildInitialize () [0x00008] in /Users/poupou/git/master/xamarin-macios/tools/mtouch/Application.cs:684
  at Xamarin.Bundler.Application+<>c.<BuildAll>b__135_0 (Xamarin.Bundler.Application v) [0x00000] in /Users/poupou/git/master/xamarin-macios/tools/mtouch/Application.cs:638
  at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x0001e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Collections/Generic/List.cs:578
  at Xamarin.Bundler.Application.BuildAll () [0x00023] in /Users/poupou/git/master/xamarin-macios/tools/mtouch/Application.cs:638
  at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x0041c] in /Users/poupou/git/master/xamarin-macios/tools/mtouch/mtouch.cs:1154
  at Xamarin.Bundler.Driver.Main (System.String[] args) [0x00015] in /Users/poupou/git/master/xamarin-macios/tools/common/Driver.cs:35
```
2020-05-11 19:40:44 -04:00
Sebastien Pouliot 1d45792e5b
[linker] Remove internal [NullablePublicOnly] attribute from apps (#8568)
I've only seen it with .net5 so far but it's better handled in master
and flow back into the branch
2020-05-11 19:39:43 -04:00
Rolf Bjarne Kvinge ea25433d75
[mtouch/mmp] Share EnableProfiling. (#8563) 2020-05-11 16:42:21 +02:00
Rolf Bjarne Kvinge b18466f7f2
[mtouch/mmp] Share Abi code. (#8562) 2020-05-11 16:27:19 +02:00
Sebastien Pouliot 3c263b0527
[linker] Fix RemoveAttributes pre-check (#8554)
The current check made the elimination of `[System.CLSCompliant]`
impossible.
2020-05-11 08:40:48 -04:00
Rolf Bjarne Kvinge e9cd70e085
[mtouch] Fix path to simlauncher.mm in project file. (#8561) 2020-05-11 14:27:48 +02:00
Rolf Bjarne Kvinge 44653d7553
[mtouch/mmp] Share the RegistrarMode enum. (#8553) 2020-05-11 08:57:41 +02:00
Rolf Bjarne Kvinge 2926083d20
[runtime/mmp] Put libxammac and xamarin headers for Xamarin.Mac in the same directory as the corresponding files for Xamarin.iOS. (#8542)
That's in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/SDKs/Xamarin.macOS.sdk/[lib|include]

This allows for a bit more code share between mtouch and mmp.
2020-05-08 13:04:32 +02:00
Rolf Bjarne Kvinge f53fd82291
[mtouch] Introduce helper function for getting the architecture-specific directory where the platform assembly is. (#8537)
This removes a little bit of duplicated code.
2020-05-08 09:17:55 +02:00
Rolf Bjarne Kvinge 0e03a929e4
Merge pull request #8541 from rolfbjarne/linker-no-constructor
[linker] Don't pass information to linker steps by selectively creating them or using constructors.

Instead use the built-in logic to determine if a linker step should light up,
and use information available in the LinkContext to determine how steps should
behave.

This is required for .NET, where linker steps can't have custom constructors.

Several steps have not been modified, because they're not all required in .NET.
2020-05-07 18:18:57 +02:00
Rolf Bjarne Kvinge 0511006ec2
[mtouch/mmp] Introduce more specific helper functions for locating libxamarin*.dylib and Xamarin*.framework. (#8538)
This allows a little bit more sharing between mmp and mtouch.
2020-05-07 16:20:07 +02:00
Rolf Bjarne Kvinge d884c2a2c7 [linker] We don't need to pass the linker options to create sub steps anymore. 2020-05-07 15:51:47 +02:00
Rolf Bjarne Kvinge 17ac227fb3 [linker] Stop passing data to the OptimizeGeneratedCode steps using a constructor. 2020-05-07 15:51:47 +02:00
Rolf Bjarne Kvinge d5aaa964e1 [linker] Stop passing data to the RemoveUserResources sub step using a constructor. 2020-05-07 15:51:47 +02:00
Rolf Bjarne Kvinge 41abc3af77 [linker] Always create the RemoveCode step, and instead detect if it should be active using the LinkContext field. 2020-05-07 15:51:47 +02:00
Rolf Bjarne Kvinge 196ea91a72 [linker] Always create the CoreRemoveSecurity step, and instead detect if it should be active using the LinkContext field. 2020-05-07 15:51:38 +02:00
Rolf Bjarne Kvinge 1b3cb7747e [linker] Always create the [Core]RemoveAttributes steps, and instead detect if it should be active using the LinkContext field. 2020-05-07 15:51:38 +02:00
Rolf Bjarne Kvinge 0dde91584c [linker] Stop passing data to the CoreHttpMessageHandler step using a constructor. 2020-05-07 15:51:38 +02:00
Rolf Bjarne Kvinge 03c6f8d1cc
[mmp] Remove the Driver.linker_options field, and use BuildTarget.LinkerOptions instead. (#8540)
This will eventually allow for more code sharing between mtouch and mmp.
2020-05-07 15:01:26 +02:00
Rolf Bjarne Kvinge 3ce5b69276
[linker] Remove extranous space in user-visible text. (#8539) 2020-05-07 15:00:53 +02:00
Rolf Bjarne Kvinge 48b7ef4696
[mtouch/mmp] Pass the path to mscorlib explicitly to the partial static registrar code instead of relying on resolving it successfully. (#8525)
This makes the code simpler when we have to add support for .NET.

This requires modifying the linker to accept a null FrameworkDirectory.
2020-05-07 08:37:17 +02:00
Sebastien Pouliot 61580b15af
[linker] Update custom attributes that can be removed (#8535)
Some are no longer part of the SDK (or converted into new ones
at build time), others were new (and missing).

A full list of attributes and their usage frequency in what we ship can
be seen in https://gist.github.com/spouliot/ca03c6da7d4d75670ca77749350eb8a2

Also update tests: no need to check for removals of stuff that does not
exists anymore.
2020-05-06 20:44:52 -04:00
Sebastien Pouliot 73da7658dc
[linker] Directly use Annotations in BaseStep subclasses (#8530)
It's exposed directly in `BaseStep` and makes porting code easier to net5
2020-05-06 20:43:16 -04:00
Sebastien Pouliot b462447053
[mtouch] Fix debug with profiler on app extensions (#8505)
Always add `libmono-profiler-log.dylib` if profiling is enabled and we
are building with dynamic libraries. The profiler code is not (meant to
be) shipped so it can be added even without a `Frameworks` directory.

This fix debugging too (if profiler is enabled) since the library was
linked (even if it was not included).

Fix https://github.com/xamarin/xamarin-macios/issues/8470

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2020-05-06 17:34:44 -04:00
Rolf Bjarne Kvinge 296eabd9ac
[mmp] Always pass --nolink when generating the partial static registrar code. (#8524)
The fact that the mobile profile allows linking doesn't mean it should be done
(it doesn't actually link because we run the registrar before linking happens,
but this way the code is less confusing and there are no unnecessary
differences between full and mobile).
2020-05-06 16:43:55 +02:00
Rolf Bjarne Kvinge 7b927aa558
[linker] Remove unused LinkerOptions.IsDualBuild field. (#8522) 2020-05-06 14:11:08 +02:00
Rolf Bjarne Kvinge d574250a27
Remove XAMARIN_APPLETLS, it seems like it's always defined, which means it's not needed. (#8523)
Also remove outdated comment about Xamarin.Mac/Classic, since XM/Classic is dead.
2020-05-06 14:11:02 +02:00
Rolf Bjarne Kvinge a1c8b59e8a
[mmp] No need to pass --xamarin-full-framework when generating the partial static registrar code. (#8520)
It's already implied with the --framework argument.
2020-05-06 14:10:31 +02:00
Rolf Bjarne Kvinge f7bc4e2364
[mtouch] Generate partial static registrar code for arm64_32 as well. (#8521) 2020-05-06 14:10:12 +02:00
Rolf Bjarne Kvinge 70cfbca868
[mtouch] Rework makefile logic to use a template to minimize code duplication. (#8518)
This becomes more important with .NET, when we'll have twice as many files to generate and compile.
2020-05-06 09:25:30 +02:00
Rolf Bjarne Kvinge 352dc6b796
[mmp] Simplify partial static registrar generation command a little bit. (#8516) 2020-05-06 09:24:47 +02:00
Rolf Bjarne Kvinge cf2b43ef5d
[mmp] Use our explicit clang execution instead of using xcrun. (#8517)
This way we use the Xcode.app we've configured in Make.config.
2020-05-06 09:15:46 +02:00
Rolf Bjarne Kvinge c81f254a28
[mtouch/mmp] Share Driver.GetFrameworks. (#8511) 2020-05-05 16:52:56 +02:00
Rolf Bjarne Kvinge 6f5299fe3d
[mtouch/mmp] Remove IStaticRegistrar, it's no longer needed. (#8512)
It was created to support Xamarin.Mac/Classic, but that's not supported
anymore, so we can just remove this interface.
2020-05-05 16:50:28 +02:00
Rolf Bjarne Kvinge 83e77173dc
[mtouch] Detect the right build target for the partial static registrar. (#8508) 2020-05-05 15:35:35 +02:00
Rolf Bjarne Kvinge acfb101a78
[mtouch/mmp] Share the Application.References field. (#8507) 2020-05-05 15:35:02 +02:00
Rolf Bjarne Kvinge fc990997b4
[mmp] Use absolute paths when generating the partial static registrar code. (#8509)
Makes it easier to c&p commands and execute them elsewhere.
2020-05-05 15:31:17 +02:00
Rolf Bjarne Kvinge 5e398e0f02
[mmp] No need to lipo a single executable file. (#8510)
Just copy it instead.
2020-05-05 15:31:06 +02:00
Sebastien Pouliot e45278259b
[linker] Remove now unneeded code from PreserveCode (#8504)
`monotouch-glue.m` was replaced a while ago and the new code does not
need `Class.LookupFullName` to be preserved in debug builds.

Also `PreserveType` was unused code (left from even older times?)
2020-05-05 09:27:26 -04:00