Exemplo n.º 1
0
        public static void GetSimulatorCompilerFlags(CompilerFlags flags, string ifile, Application app, string language = null)
        {
            GetCompilerFlags (flags, ifile, language);

            if (Driver.SDKVersion == new Version ())
                throw new MonoTouchException (25, true, "No SDK version was provided. Please add --sdk=X.Y to specify which iOS SDK should be used to build your application.");

            string sim_platform = Driver.PlatformDirectory;
            string plist = Path.Combine (sim_platform, "Info.plist");

            var dict = Driver.FromPList (plist);
            var dp = dict.Get<PDictionary> ("DefaultProperties");
            if (dp.GetString ("GCC_OBJC_LEGACY_DISPATCH") == "YES")
                    flags.AddOtherFlag ("-fobjc-legacy-dispatch");
            string objc_abi = dp.GetString ("OBJC_ABI_VERSION");
            if (!String.IsNullOrWhiteSpace (objc_abi))
                flags.AddOtherFlag ($"-fobjc-abi-version={objc_abi}");

            plist = Path.Combine (Driver.FrameworkDirectory, "SDKSettings.plist");
            string min_prefix = Driver.CompilerPath.Contains ("clang") ? Driver.TargetMinSdkName : "iphoneos";
            dict = Driver.FromPList (plist);
            dp = dict.Get<PDictionary> ("DefaultProperties");
            if (app.DeploymentTarget == new Version ()) {
                string target = dp.GetString ("IPHONEOS_DEPLOYMENT_TARGET");
                if (!String.IsNullOrWhiteSpace (target))
                    flags.AddOtherFlag ($"-m{min_prefix}-version-min={target}");
            } else {
                flags.AddOtherFlag ($"-m{min_prefix}-version-min={app.DeploymentTarget}");
            }
            string defines = dp.GetString ("GCC_PRODUCT_TYPE_PREPROCESSOR_DEFINITIONS");
            if (!String.IsNullOrWhiteSpace (defines))
                flags.AddDefine (defines.Replace (" ", String.Empty));
        }
Exemplo n.º 2
0
 StaticRegistrar(Application app)
 {
     trace = !LaxMode && (app.RegistrarOptions & RegistrarOptions.Trace) == RegistrarOptions.Trace;
 }
Exemplo n.º 3
0
        public StaticRegistrar(Application app, IEnumerable<AssemblyDefinition> assemblies, bool is_simulator, bool is_64_bits, Mono.Linker.LinkContext link_context)
            : this(app)
        {
            this.is_simulator = is_simulator;
            this.is_64_bits = is_64_bits;
            this.input_assemblies = assemblies;

            availability_annotations = link_context?.Annotations.GetCustomAnnotations ("Availability");

            foreach (var assembly in assemblies)
                RegisterAssembly (assembly);
        }
Exemplo n.º 4
0
        public StaticRegistrar(Application app, IEnumerable<AssemblyDefinition> assemblies, bool is_simulator, string single_assembly = null)
            : this(app)
        {
            this.is_simulator = is_simulator;
            this.single_assembly = single_assembly;
            this.input_assemblies = assemblies;

            foreach (var assembly in assemblies)
                RegisterAssembly (assembly);
        }
Exemplo n.º 5
0
 public static string Generate(Application app, IEnumerable<AssemblyDefinition> list, bool simulator, string single_assembly = null)
 {
     return new StaticRegistrar (app, list, simulator, single_assembly).Generate ();
 }
Exemplo n.º 6
0
 public static string Generate(Application app, IEnumerable<AssemblyDefinition> list, bool simulator, bool is_64_bits, Mono.Linker.LinkContext link_context)
 {
     return new StaticRegistrar (app, list, simulator, is_64_bits, link_context).Generate ();
 }