mirror of
https://github.com/rui314/mold.git
synced 2024-12-29 11:24:36 +03:00
Add -V option
This commit is contained in:
parent
18acebad2d
commit
6014faec2a
@ -365,6 +365,12 @@ void parse_nonpositional_args(Context<E> &ctx,
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (read_flag(args, "V")) {
|
||||||
|
SyncOut(ctx) << "mold " GIT_HASH " (compatible with GNU ld)\n"
|
||||||
|
<< " Supported emulations:\n elf_x86_64\n elf_i386";
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (read_flag(args, "help")) {
|
if (read_flag(args, "help")) {
|
||||||
SyncOut(ctx) << "Usage: " << ctx.cmdline_args[0]
|
SyncOut(ctx) << "Usage: " << ctx.cmdline_args[0]
|
||||||
<< " [options] file...\n\n"
|
<< " [options] file...\n\n"
|
||||||
|
@ -8,4 +8,8 @@ mkdir -p $t
|
|||||||
../mold -v | grep -Pq 'mold .*\(compatible with GNU ld\)'
|
../mold -v | grep -Pq 'mold .*\(compatible with GNU ld\)'
|
||||||
../mold --version | grep -Pq 'mold .*\(compatible with GNU ld\)'
|
../mold --version | grep -Pq 'mold .*\(compatible with GNU ld\)'
|
||||||
|
|
||||||
|
../mold -V | grep -Pq 'mold .*\(compatible with GNU ld\)'
|
||||||
|
../mold -V | grep -q elf_x86_64
|
||||||
|
../mold -V | grep -q elf_i386
|
||||||
|
|
||||||
echo OK
|
echo OK
|
||||||
|
Loading…
Reference in New Issue
Block a user