Skip to content

Commit 6bdf20d

Browse files
Omnibus: build libyaml with --disable-shared (#95)
Removing the dynamic library forces the compiler to pick the static library, removing libyaml as a runtime dependency for shards.
1 parent 2d7716a commit 6bdf20d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

omnibus/config/software/libyaml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
build do
2626
env = with_standard_compiler_flags(with_embedded_path)
2727

28-
command "./configure --prefix=#{install_dir}/embedded", env: env
28+
command "./configure --disable-shared --prefix=#{install_dir}/embedded", env: env
2929

3030
make "-j #{workers}", env: env
3131
make "-j #{workers} install", env: env

omnibus/config/software/shards.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@
4545
source url: "https://github.com/crystal-lang/shards/archive/v#{version}.tar.gz"
4646

4747
relative_path "shards-#{version}"
48-
env = with_standard_compiler_flags(with_embedded_path)
48+
env = with_standard_compiler_flags(with_embedded_path(
49+
"LIBRARY_PATH" => "#{install_dir}/embedded/lib",
50+
"CRYSTAL_LIBRARY_PATH" => "#{install_dir}/embedded/lib"
51+
))
4952

5053
build do
5154
make "bin/shards SHARDS=false CRYSTAL=#{install_dir}/bin/crystal FLAGS='--no-debug --release'", env: env
52-
command "cp bin/shards #{install_dir}/embedded/bin/shards"
55+
copy "bin/shards", "#{install_dir}/embedded/bin/shards"
5356
end

0 commit comments

Comments
 (0)