From 5a43ac7e129278e4e5af85d7c922a42492d843f6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 4 Aug 2020 09:07:07 +0100 Subject: [PATCH] Pass -g option when compiling ppx extensions. https://github.com/ocaml/dune/pull/3671 --- 3671.patch | 38 ++++++++++++++++++++++++++++++++++++++ ocaml-dune.spec | 10 +++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 3671.patch diff --git a/3671.patch b/3671.patch new file mode 100644 index 0000000..2361301 --- /dev/null +++ b/3671.patch @@ -0,0 +1,38 @@ +From a176b0ce6d6be0cdd6c7b04c3d655cae567527e2 Mon Sep 17 00:00:00 2001 +From: Rudi Grinberg +Date: Tue, 4 Aug 2020 00:56:34 -0700 +Subject: [PATCH] Pass -g when compiling ppx preprocessor + +Signed-off-by: Rudi Grinberg +--- + CHANGES.md | 2 ++ + src/dune/preprocessing.ml | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CHANGES.md b/CHANGES.md +index 3bb8c04160..f195d7ca45 100644 +--- a/CHANGES.md ++++ b/CHANGES.md +@@ -76,6 +76,8 @@ next + - Fix a stack overflow when displaying large outputs (including diffs) (#3537, + fixes #2767, #3490, @emillon) + ++- Pass `-g` when compiling ppx preprocessors (#3671, @rgrinberg) ++ + 2.6.0 (05/06/2020) + ------------------ + +diff --git a/src/dune/preprocessing.ml b/src/dune/preprocessing.ml +index 87c765256c..53a391448b 100644 +--- a/src/dune/preprocessing.ml ++++ b/src/dune/preprocessing.ml +@@ -332,7 +332,8 @@ let build_ppx_driver sctx ~dep_kind ~target ~pps ~pp_names = + (Build.record_lib_deps + (Lib_deps.info ~kind:dep_kind (Lib_deps.of_pps pp_names))) + >>> Command.run compiler ~dir:(Path.build ctx.build_dir) +- [ A "-o" ++ [ A "-g" ++ ; A "-o" + ; Target target + ; A "-w" + ; A "-24" diff --git a/ocaml-dune.spec b/ocaml-dune.spec index e32e07a..7223d72 100644 --- a/ocaml-dune.spec +++ b/ocaml-dune.spec @@ -6,7 +6,7 @@ Name: ocaml-%{libname} Version: 2.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A composable build system for OCaml # Dune itself is MIT. Some bundled libraries have a different license: @@ -22,6 +22,10 @@ License: MIT and LGPLv2 and LGPLv2 with exceptions and ISC URL: https://dune.build Source0: https://github.com/ocaml/%{libname}/archive/%{version}/%{libname}-%{version}.tar.gz +# Pass -g when compiling ppx extensions. +# https://github.com/ocaml/dune/pull/3671 +Patch1: 3671.patch + BuildRequires: emacs BuildRequires: ocaml >= 4.07 BuildRequires: ocaml-findlib @@ -191,6 +195,10 @@ cp -ar README.md CHANGES.md MIGRATION.md doc/_build/* %{buildroot}%{_pkgdocdir}/ %{_emacs_sitelispdir}/dune* %changelog +* Tue Aug 4 2020 Richard W.M. Jones - 2.6.2-2 +- Pass -g option when compiling ppx extensions. + https://github.com/ocaml/dune/pull/3671 + * Mon Aug 3 2020 Jerry James - 2.6.2-1 - New version 2.6.2