Skip to content

Commit e638696

Browse files
committed
Merge branch 'fix-ci-failures-on-master'
This fixes the CI builds on Git's own `master`, which is broken for over two weeks already, with no signs that anyone might find anything wrong with that situation. I am upstreaming this in gitgitgadget#1994. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2 parents 855b709 + 0949ff2 commit e638696

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/cargo-meson.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ then
55
exit 1
66
fi
77

8+
target="$1"
9+
shift
10+
811
SOURCE_DIR="$1"
912
BUILD_DIR="$2"
1013
BUILD_TYPE=debug
@@ -26,7 +29,7 @@ then
2629
exit $RET
2730
fi
2831

29-
if ! cmp "$BUILD_DIR/$BUILD_TYPE/libgitcore.a" "$BUILD_DIR/libgitcore.a" >/dev/null 2>&1
32+
if ! cmp "$BUILD_DIR/$BUILD_TYPE/$target" "$BUILD_DIR/$target" >/dev/null 2>&1
3033
then
31-
cp "$BUILD_DIR/$BUILD_TYPE/libgitcore.a" "$BUILD_DIR/libgitcore.a"
34+
cp "$BUILD_DIR/$BUILD_TYPE/$target" "$BUILD_DIR/$target"
3235
fi

src/meson.build

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ libgit_rs_sources = [
33
'varint.rs',
44
]
55

6+
# The exact file name depends on the compiler
7+
if meson.get_compiler('c').get_id() == 'msvc'
8+
target = 'gitcore.lib'
9+
else
10+
target = 'libgitcore.a'
11+
endif
12+
613
# Unfortunately we must use a wrapper command to move the output file into the
714
# current build directory. This can fixed once `cargo build --artifact-dir`
815
# stabilizes. See https://github.com/rust-lang/cargo/issues/6790 for that
916
# effort.
1017
cargo_command = [
1118
shell,
1219
meson.current_source_dir() / 'cargo-meson.sh',
20+
target,
1321
meson.project_source_root(),
1422
meson.current_build_dir(),
1523
]
@@ -21,7 +29,7 @@ libgit_rs = custom_target('git_rs',
2129
input: libgit_rs_sources + [
2230
meson.project_source_root() / 'Cargo.toml',
2331
],
24-
output: 'libgitcore.a',
32+
output: target,
2533
command: cargo_command,
2634
)
2735
libgit_dependencies += declare_dependency(link_with: libgit_rs)

0 commit comments

Comments
 (0)