-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mtouch/mmp] Share numerous command-line arguments. #8599
Conversation
Build failure Test results1 tests failed, 88 tests passed.Failed tests
|
tools/common/Driver.cs
Outdated
#endif | ||
#if MMP | ||
options.Add ("a|assembly=", "Add an assembly to be processed [DEPRECATED, use --reference instead]", v => app.References.Add (v), true); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ should not those remain the the tool-specific files to avoid #if
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is fine to keep together and maybe be able to remove/hide in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spouliot Yes, the idea is to keep the related code close, but I'm fine either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved this code back into mtouch.cs/driver.cs
tools/common/Driver.cs
Outdated
} catch (Exception ex) { | ||
throw ErrorHelper.CreateError (26, ex, Errors.MX0026, $"minos:{v}", ex.Message); | ||
} | ||
}, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, why not keep it inside mmp itself ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is minor: most of the newly added options need punctuation to be consistent with the existing ones.
tools/common/Driver.cs
Outdated
options.Add ("version", "Output version information and exit.", v => a = Action.Version); | ||
options.Add ("v|verbose", "Specify how verbose the output should be. This can be passed multiple times to increase the verbosity.", v => Verbosity++); | ||
options.Add ("q|quiet", "Specify how quiet the output should be. This can be passed multiple times to increase the silence.", v => Verbosity--); | ||
options.Add ("debug:", "Build a debug app. If AOT-compiling, will also generate native debug code for the specified assembly (set to 'all' to generate debug code for all assemblies, the default is to generate debug code for user assemblies only)", v => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the last sentence needs a .
at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephen-hawley fixed
tools/common/Driver.cs
Outdated
options.Add ("sdkroot=", "Specify the location of Apple SDKs, default to 'xcode-select' value.", v => sdk_root = v); | ||
options.Add ("sdk=", "Specifies the SDK version to compile against (version, for example \"10.9\")", v => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a .
at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephen-hawley fixed
tools/common/Driver.cs
Outdated
options.Add ("target-framework=", "Specify target framework to use. Currently supported: '" + string.Join ("', '", TargetFramework.ValidFrameworks.Select ((v) => v.ToString ())) + "'.", v => SetTargetFramework (v)); | ||
#if MMP | ||
options.Add ("abi=", "Comma-separated list of ABIs to target. x86_64", v => app.ParseAbi (v)); | ||
#else | ||
options.Add ("abi=", "Comma-separated list of ABIs to target. Currently supported: armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, arm64, arm64+llvm, arm64_32, arm64_32+llvm, i386, x86_64", v => app.ParseAbi (v)); | ||
#endif | ||
options.Add ("no-xcode-version-check", "Ignores the Xcode version check.", v => { min_xcode_version = null; }, true /* This is a non-documented option. Please discuss any customers running into the xcode version check on the maciosdev@ list before giving this option out to customers. */); | ||
options.Add ("nolink", "Do not link the assemblies", v => app.LinkMode = LinkMode.None); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stephen-hawley fixed
tools/common/Driver.cs
Outdated
app.Registrar = RegistrarMode.PartialStatic; | ||
break; | ||
case "il": | ||
app.Registrar = RegistrarMode.Dynamic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is il
really an exact alias for dynamic? Does it need to be deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
building on that comment, we can move the case next to the dynamic one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed the il
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
options.Add ("registrar:", "Specify the registrar to use (dynamic, static or default (dynamic in the simulator, static on device))", v => { | ||
var split = v.Split ('='); | ||
var name = split [0]; | ||
var value = split.Length > 1 ? split [1] : string.Empty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we trust people not doing 'stupid' things like Static etc..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They'll just get an error saying to use static
instead.
tools/common/Driver.cs
Outdated
app.Registrar = RegistrarMode.PartialStatic; | ||
break; | ||
case "il": | ||
app.Registrar = RegistrarMode.Dynamic; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
building on that comment, we can move the case next to the dynamic one.
Build success |
The IL generator was what MonoMac had before the dynamic/static registrar code got shared between MonoTouch and MonoMac. The IL registrar been gone for years, and as far as I know nobody ever used --registrar:il, even though it was provided as a compatibility option in the beginning (we still had the IL registrar around for a while after adding the static+dynamic registrars, until it was completely replaced by the dynamic registrar). So just remove this option, if anyone ever used it they can replace it with --registrar:dynamic.
Build success |
This PR is probably easiest to reviewed commit-by-commit.