From 3b1835dd2ede76fae9048731a387ebb0722d99cf Mon Sep 17 00:00:00 2001 From: Igor Goryachev Date: Tue, 2 Jul 2024 12:59:04 +0300 Subject: [PATCH] Preserve source when building with deterministic option --- lib/compiler/src/compile.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 04f13f3080d..8ab193e8a23 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -2588,6 +2588,8 @@ compile_info(File, CompilerOpts, Opts) -> case paranoid_absname(File) of [_|_] = Source when not IsSlim, not IsDeterministic -> [{source,Source} | Info0]; + [_|_] = Source when IsDeterministic -> + [{source,filename:basename(Source)} | Info0]; _ -> Info0 end,