From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 250EE7EE36 for ; Wed, 23 Mar 2016 11:14:44 +0100 (CET) IronPort-PHdr: 9a23:VaGprRVdIM6rHXNf4ooc9mMe5PnV8LGtZVwlr6E/grcLSJyIuqrYZh2Ht8tkgFKBZ4jH8fUM07OQ6PCwHzVeqs7d+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq82VOlsD3Gb1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu3SNp41Rr1ADTkgL3t9pIiy7UGCHkOz4S4gUmITmwEALAHX5R78V5brv2Ouqup63SCBFcL/X7k7Xz2j9aotTwXn3nQpLTk8pU7egNZxgaYTmxmhqgZy2caAb4ifLvtzeuXGdtMXX2dbdslUXi1FRIi7at1cXKI6Ie9Eotyl9BM1phykCFzpXbu3xw== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-io0-f177.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.177 as permitted sender) identity=mailfrom; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-io0-f177.google.com) identity=helo; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-io0-f177.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BYAQAEbPJWi7HfVdFeg1I1egaoQocminQBDYFwFwqCPIMwAoE4BzgUAQEBAQEBAQEQAQEBCAsLCR8xgi2CFQEBBAEBAQ8RHQEbEgsBAwwGBQsNAgIRFQICIgEEAQwBBQEcBhMih28BAxIOoVuBMT4xizaBaoJXhncKGScNUYQgAQEBAQEFAQEBAQEBFAEFCgVthSKERIQ6QYJBglYFl1mBUoQfgnMFgjGCaoIzjFeNSREegQ8eAQGCOB6BUjsuigsBAQE X-IPAS-Result: A0BYAQAEbPJWi7HfVdFeg1I1egaoQocminQBDYFwFwqCPIMwAoE4BzgUAQEBAQEBAQEQAQEBCAsLCR8xgi2CFQEBBAEBAQ8RHQEbEgsBAwwGBQsNAgIRFQICIgEEAQwBBQEcBhMih28BAxIOoVuBMT4xizaBaoJXhncKGScNUYQgAQEBAQEFAQEBAQEBFAEFCgVthSKERIQ6QYJBglYFl1mBUoQfgnMFgjGCaoIzjFeNSREegQ8eAQGCOB6BUjsuigsBAQE X-IronPort-AV: E=Sophos;i="5.24,382,1454972400"; d="scan'208";a="209674381" Received: from mail-io0-f177.google.com ([209.85.223.177]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Mar 2016 11:14:43 +0100 Received: by mail-io0-f177.google.com with SMTP id v187so1662577ioe.2 for ; Wed, 23 Mar 2016 03:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bjdE7aq+S4sI7fZFGGInginGPKY+Y+DJ0ZUeg/DZ4bs=; b=W4TDmdGnfmstNV0brSr5CVlaHi8DVcv9CKsumkTveaS7st+mAn1tnHnDv7nT/UV6wB D4JtVBmTw+aXJOBLkesooVwtUEZUKf/tJockHRRvexJ/F1uugUaTFovW2YHfdUw0CvBq 3vwWiqVXUjp1HFnzeXV09xQ7zjJtrXNE5AVOC0zLScfdJ4PDYmiC/kqIB2rW+9HmIez7 40glU4VveM0BRvz4MLi43TwZsPt9ULQ6IR58bzmsuFqhMBcPR5oKNpxqeNSBDiqKOK5R Gk5F0tfNd+uK0Okm6S3ljddbjdvJfWiy3z6qaOIppCo9BbF2/Hd/03sgASKBzGO9H89n SviQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bjdE7aq+S4sI7fZFGGInginGPKY+Y+DJ0ZUeg/DZ4bs=; b=PLz0fJYglqLqI01KH6n92l2OPRTSesXhZDxHKOIEIDezZc3jrrnVYn0BsJDjFU+R6X OPf9MCC6GkDTJZQWTAsk/kWzC7M6s+c677+XwsndF27QT3HiZu4za5oJJmS/tMpQMSI/ pgAhrWEnPId4xUthTngUgpg9WvlKoHClwwY+CT/Jo2q62OYjvlyHtwIlWCH2pxi5oLCq KpkMmt5EXDdxrYVh6dPhrUX6VeFjJiKVg1jNahDUvLIh0BcDzjcFiLdI12LSCs8JtPtD iQ5rkgxoQbdwXj06as6maB8O+JcEg8Iimcvy91TwLoovj+KBD83Rs/vKRaf5rcFcGhm0 LsRg== X-Gm-Message-State: AD7BkJJm9WNHN7/bnU/Fg5mGBSYqZ08IuK/bheUhDNj+F90tWU201VfHYZlkUtcslLPIPfJ9Z79ElUpAIuVwQA== X-Received: by 10.107.33.7 with SMTP id h7mr2459460ioh.30.1458728010471; Wed, 23 Mar 2016 03:13:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.17.4 with HTTP; Wed, 23 Mar 2016 03:12:50 -0700 (PDT) In-Reply-To: References: <30AF5A7CB977477A9BF094F3BC19C58C@erratique.ch> From: Gabriel Scherer Date: Wed, 23 Mar 2016 11:12:50 +0100 Message-ID: To: Thomas Gazagnaire Cc: =?UTF-8?Q?Daniel_B=C3=BCnzli?= , platform , OCaml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] [ocaml-platform] Package compilation and debug mode The new (4.03) ocaml_compiler_internal_params mechanism might be of use here: OCAMLPARAM option passed using a configuration file https://github.com/ocaml/ocaml/pull/428 Note that as a software packager I would be fine fetching a %{debug}% variable and adapt my configure/build chain to handle it. I already have specific logic for ocaml-native and ocaml-native-tools. But I wonder whether this approach scales to other preferences one may want to set globally. (OCAMLPARAM is a kludge, but duplicating it inside OPAM may not be much better.) On Wed, Mar 23, 2016 at 11:02 AM, Thomas Gazagnaire wrote: >> By default all my packages are released with -g disabled. It seems easy = enough to have an opam switch (even the official one) that automatically en= ables the flag. > > How do you envision such a global debug flag? As far as I know, there is = no configuration-time option to enable that option in the compiler (which w= ould be the cleaner option IMHO). I'd rather avoid using OCAMLPARAM for thi= s. A new opam variable can be created and used in the opam file to pass the= debug command (or not) explicitly to the build system, but this will requi= re adapting all the build systems (and ideally a new release of opam, but w= e can work-around that by setting OPAMVAR_debug in the .comp file). > >> So I think OCaml's opam repository should have a policy here. The answer= should also take system package managers into account since those pull dir= ectly from the tarballs (if this document [3] is still in use for debian it= seems they do require compilation with debug mode). >> >> Personally I don't have an opinion about it, I'm rather seeking an answe= r here. > > I don't have a strong opinion either. I like when packages come with -g b= y default, but I can understand that the (small) runtime cost can be a prob= lem for deployment scenarios. > > Thomas > _______________________________________________ > Platform mailing list > Platform@lists.ocaml.org > http://lists.ocaml.org/listinfo/platform