Skip to content

Commit 2964545

Browse files
authored
Use python rather than perl for profiling (#946)
In #833 we changed from the built-in date command to perl for getting the system time in ms; this caused some weird interactions with the OS when installed via `kup`: runtimeverification/kup#80 This PR drops our use of `perl` and instead uses an equivalent `python3` command, which we already depend on when building the backend.
1 parent 136dc46 commit 2964545

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ profile=${profile:-false}
77

88

99
time_now_ms () {
10-
perl -MTime::HiRes=time -e 'printf "%d\n", time*1000'
10+
python3 -c 'import time; print(time.time_ns() // 1_000_000)'
1111
}
1212

1313
indented () {

nix/llvm-backend.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ lib, src, cmake, flex, fmt, pkgconfig, llvm, libllvm, libcxxabi, stdenv, boost, gmp
22
, jemalloc, libffi, libiconv, libyaml, mpfr, ncurses, python39, unixtools,
33
# Runtime dependencies:
4-
host, perl,
4+
host,
55
# Options:
66
cmakeBuildType ? "FastBuild" # optimized release build, currently: LTO
77
}:
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
2424
-e '2a export PATH="${lib.getBin host.clang}/bin:''${PATH}"'
2525
2626
substituteInPlace bin/utils.sh \
27-
--replace 'perl' '${perl}/bin/perl'
27+
--replace 'python3' '${python-env.interpreter}'
2828
2929
substituteInPlace bin/llvm-kompile \
3030
--replace 'python_cmd=python3' 'python_cmd="${python-env.interpreter}"' \

0 commit comments

Comments
 (0)