Pass -g option when compiling ppx extensions.

https://github.com/ocaml/dune/pull/3671
This commit is contained in:
Richard W.M. Jones 2020-08-04 09:07:07 +01:00
parent 80e921d901
commit 5a43ac7e12
2 changed files with 47 additions and 1 deletions

38
3671.patch Normal file
View File

@ -0,0 +1,38 @@
From a176b0ce6d6be0cdd6c7b04c3d655cae567527e2 Mon Sep 17 00:00:00 2001
From: Rudi Grinberg <me@rgrinberg.com>
Date: Tue, 4 Aug 2020 00:56:34 -0700
Subject: [PATCH] Pass -g when compiling ppx preprocessor
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
---
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"

View File

@ -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 <rjones@redhat.com> - 2.6.2-2
- Pass -g option when compiling ppx extensions.
https://github.com/ocaml/dune/pull/3671
* Mon Aug 3 2020 Jerry James <loganjerry@gmail.com> - 2.6.2-1
- New version 2.6.2