-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Split cxx flags by phase * Add link flags when building libraries * Add default cxx link flags for exe with cxx stubs * Update tests Signed-off-by: Ulysse Gérard <[email protected]>
- Loading branch information
Showing
15 changed files
with
210 additions
and
56 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
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
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 |
---|---|---|
@@ -1,2 +1,12 @@ | ||
#include <caml/mlvalues.h> | ||
#include <caml/io.h> | ||
#include <iostream> | ||
|
||
extern "C" value baz(value unit) { return Val_int(2046); } | ||
|
||
extern "C" void hello_world_baz (); | ||
|
||
void hello_world_baz () | ||
{ | ||
std::cout << "Hello World Baz!\n"; | ||
} |
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,11 @@ | ||
#include <caml/mlvalues.h> | ||
#include <iostream> | ||
|
||
extern "C" value bazexe(value unit) { return Val_int(4096); } | ||
|
||
extern "C" void hello_world_bazexe (); | ||
|
||
void hello_world_bazexe () | ||
{ | ||
std::cout << "Hello World Bazexe!"; | ||
} |
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 |
---|---|---|
|
@@ -6,5 +6,5 @@ | |
(executable | ||
(name main) | ||
(libraries quad) | ||
(foreign_stubs (language cxx) (names bazexe)) | ||
(modules main)) | ||
|
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 |
---|---|---|
@@ -1 +1,9 @@ | ||
let () = Printf.printf "%d" (Quad.quad ()) | ||
external bazexe : unit -> int = "bazexe" | ||
external hello_world_bazexe : unit -> unit = "hello_world_bazexe" | ||
|
||
let () = Quad.hello (); hello_world_bazexe () | ||
|
||
|
||
let () = Printf.printf "%d\n%d\n" | ||
(Quad.quad ()) | ||
(bazexe ()) |
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 |
---|---|---|
@@ -1,2 +1,6 @@ | ||
external baz : unit -> int = "baz" | ||
|
||
external hello_world_baz : unit -> unit = "hello_world_baz" | ||
|
||
let quad x = baz x | ||
let hello () = hello_world_baz () |
Oops, something went wrong.