-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9960 from shindere/extend-o
Extend -o to work when compiling C files
- Loading branch information
Showing
12 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,5 @@ val run : Actions.t | |
val script : Actions.t | ||
|
||
val check_program_output : Actions.t | ||
|
||
val file_exists : Actions.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
int main() | ||
{ | ||
printf("Hello, world!\n"); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(* TEST | ||
files = "hello.c" | ||
* setup-ocamlopt.opt-build-env | ||
** script | ||
script = "mkdir outputdir" | ||
*** ocamlopt.opt | ||
all_modules = "hello.c" | ||
compile_only = "true" | ||
flags = "-o outputdir/hello.${objext}" | ||
**** file-exists | ||
file = "outputdir/hello.${objext}" | ||
*) | ||
|
||
(* | ||
This test makes sure it is possible to specify the name of the output | ||
object file when compiling a C file with the OCaml compiler. | ||
The test does not need to contain any OCaml code. | ||
*) |
1 change: 1 addition & 0 deletions
1
testsuite/tests/tool-command-line/test-o-several-files.compilers.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Options -c -o are incompatible with compiling multiple files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(* TEST | ||
* setup-ocamlopt.opt-build-env | ||
** ocamlopt.opt | ||
all_modules = "foo.c bar.c" | ||
compile_only = "true" | ||
flags = "-o outputdir/baz.${objext}" | ||
ocamlopt_opt_exit_status = "2" | ||
*** check-ocamlopt.opt-output | ||
*) | ||
|
||
(* | ||
This test makes sure that the -o option is rejected when trying to | ||
compile several C files during the same invocatin of the OCaml compiler. | ||
The test does not need to contain any OCaml code. | ||
*) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters