disable profiling since it is not support in aarch64 and s390x

This commit is contained in:
Andy Li 2017-11-19 17:32:16 +08:00
parent c8c4b69f44
commit 0c2853f007
2 changed files with 38 additions and 0 deletions

34
obuild-arg-parsing.patch Normal file
View File

@ -0,0 +1,34 @@
From 6bdda41644e9b5e5dd059885a0f3bacdfa946f9a Mon Sep 17 00:00:00 2001
From: Andy Li <andy@onthewings.net>
Date: Sun, 19 Nov 2017 21:26:07 +0800
Subject: [PATCH] do not call set_target_options when just parsing -g -pg
---
src/main.ml | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/main.ml b/src/main.ml
index 67fd4b0..cae01d8 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -42,12 +42,14 @@ let configure argv =
("--flag", Arg.String user_set_flags, "enable or disable a project's flag");
("--executable-as-obj", Arg.Unit (set_target_options "executable-as-obj" true), "output executable as obj file");
("--annot", Arg.Unit (set_target_options "annot" true), "generate .annot files");
- ("-g", Arg.Unit (
- (set_target_options "library-debugging" true) ();
- (set_target_options "executable-debugging" true)), "compilation with debugging");
- ("-pg", Arg.Unit (
- (set_target_options "library-profiling" true) ();
- (set_target_options "executable-profiling" true)), "compilation with profiling")
+ ("-g", Arg.Unit (fun () ->
+ (set_target_options "library-debugging" true)();
+ (set_target_options "executable-debugging" true)();
+ ), "compilation with debugging");
+ ("-pg", Arg.Unit (fun () ->
+ (set_target_options "library-profiling" true)();
+ (set_target_options "executable-profiling" true)();
+ ), "compilation with profiling")
] in
Arg.parse_argv (Array.of_list argv) (
enable_disable_opt "library-bytecode" "library compilation as bytecode"

View File

@ -9,6 +9,9 @@ License: BSD
URL: https://github.com/ocaml-obuild/obuild
Source0: https://github.com/ocaml-obuild/obuild/archive/obuild-v%{version}/%{name}-%{version}.tar.gz
# https://github.com/ocaml-obuild/obuild/issues/169
Patch0: obuild-arg-parsing.patch
BuildRequires: ocaml
BuildRequires: help2man
@ -27,6 +30,7 @@ way of working, adapting parts where necessary to fully support OCaml.
%prep
%setup -q -n obuild-obuild-v%{version}
%patch0 -p1
%build