-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
HelloWorldX
builders, test suites for our various compilers
Currently contains: * C * C++ * Fortran * Rust * Go The `Rust` test suite is quite restricted in platform, as we have a bit of breakage there.
- Loading branch information
1 parent
a37071a
commit df6a956
Showing
5 changed files
with
159 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using BinaryBuilder | ||
|
||
name = "HelloWorldC" | ||
version = v"1.0.0" | ||
|
||
# No sources, we're just building the testsuite | ||
sources = [ | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
mkdir -p ${prefix}/bin | ||
cc -o ${prefix}/bin/hello_world${exeext} -g -O2 /usr/share/testsuite/c/hello_world/hello_world.c | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = supported_platforms() | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
ExecutableProduct("hello_world", :hello_world), | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |
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,30 @@ | ||
using BinaryBuilder | ||
|
||
name = "HelloWorldCxx" | ||
version = v"1.0.0" | ||
|
||
# No sources, we're just building the testsuite | ||
sources = [ | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
mkdir -p ${prefix}/bin | ||
c++ -o ${prefix}/bin/hello_world${exeext} -g -O2 /usr/share/testsuite/cxx/hello_world/hello_world.cc | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = expand_cxxstring_abis(supported_platforms()) | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
ExecutableProduct("hello_world", :hello_world), | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |
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,30 @@ | ||
using BinaryBuilder | ||
|
||
name = "HelloWorldFortran" | ||
version = v"1.0.0" | ||
|
||
# No sources, we're just building the testsuite | ||
sources = [ | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
mkdir -p ${prefix}/bin | ||
f77 -o ${prefix}/bin/hello_world${exeext} -g -O2 /usr/share/testsuite/fortran/hello_world/hello_world.f | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = expand_gfortran_versions(supported_platforms()) | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
ExecutableProduct("hello_world", :hello_world), | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies) |
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,30 @@ | ||
using BinaryBuilder | ||
|
||
name = "HelloWorldGo" | ||
version = v"1.0.0" | ||
|
||
# No sources, we're just building the testsuite | ||
sources = [ | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
mkdir -p ${prefix}/bin | ||
go build -o ${prefix}/bin/hello_world${exeext} /usr/share/testsuite/go/hello_world/hello_world.go | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = supported_platforms() | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
ExecutableProduct("hello_world", :hello_world), | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; compilers=[:c, :go]) |
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,39 @@ | ||
using BinaryBuilder | ||
|
||
name = "HelloWorldRust" | ||
version = v"1.0.0" | ||
|
||
# No sources, we're just building the testsuite | ||
sources = [ | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
mkdir -p ${prefix}/bin | ||
rustc -o ${prefix}/bin/hello_world${exeext} -g /usr/share/testsuite/rust/hello_world/hello_world.rs | ||
""" | ||
|
||
# We build for a restricted set of platforms, because our rust toolchain is a little broken | ||
platforms = supported_platforms() | ||
|
||
# First, FreeBSD has -fPIC problems when linking in `crt.o` | ||
filter!(p -> !isa(p, FreeBSD), platforms) | ||
|
||
# Next, :musl libcs have a hard time linking | ||
filter!(p -> libc(p) != :musl, platforms) | ||
|
||
# Finally, windows seems to be broken | ||
# https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/499 | ||
filter!(p -> !isa(p, Windows), platforms) | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
ExecutableProduct("hello_world", :hello_world), | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; compilers=[:c, :rust]) |