Open zeim839 opened 2 years ago
Adding the target [x86, x64, ARM] logic as well!
x86, ARM, etc. are not parameters, they are values. Parameters refer to flags that take input, so If we for example have:
rinto --target=x86
Then --target
is the parameter and x86
is the value.
Here's what should be done to clear up any confusion:
The commands are:
...
[-t or --target]=[target] Target specifies the file's compilation target architecture.
parameter
section to target
section, like so (make sure each target is separated by a tab instead of a whole new line, no point wasting space here):
Target: (in place of 'the parameters are...')
x86-32 x86-64 ARM ARM-64 RISC-V
This should make usage of the --target
command more intuitive for the user. Also, from now on, you can assume that none of the other flags (-S, -h, -v) take any values. If the user was to use -S
with a specific target, they will have to use the --target
parameter also.
Updated the targets, and added the new targets, let me know if you want me to update the formatting used for the targets.
Put all the targets into one line please. So instead of doing:
for(int a = 0; a < sizeof(targ)/sizeof(targ[0]); a++)
std::cout << "\t" << targ[a].type << std::endl;
Do:
for(int a = 0; a < sizeof(targ)/sizeof(targ[0]); a++)
std::cout << "\t" << targ[a].type;
See here
Also, all functions should open curly braces on a new line (as per CONTRIBUTING.md):
// Incorrect:
void initFlags {
// ...
}
// Correct:
void initFlags
{
// ...
}
// Also correct:
for (int i = 0; i<5; i++) {
// Opening braces in new lines is for functions only
}
Braces on a new line are strictly for functions only. Everything else should open on the same line.
The CMD utility should work like so:
Parameters are flags that take values, and
[file.rin]+
is any number of .rin source files.The help section should then be:
@rohan221102