Skip to content

Commit

Permalink
Configurator: add by default --personality=@target@ to pkgconf calls
Browse files Browse the repository at this point in the history
Specifying a personality is only useful when cross-compiling (which you do when you use mingw on Windows) but
(nearly) never harmful as pkgconf installs a default.personality which it uses for all triplets (that parses
therefore the nearly) it hasn't a explicit personality for.

Signed-off-by: Pierre Boutillier <pierre.boutillier@laposte.net>
  • Loading branch information
pirbo committed Oct 18, 2024
1 parent 072f8bc commit c8e3b2d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion otherlibs/configurator/src/v1.ml
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,16 @@ module Pkg_config = struct
| None ->
Option.map (which c "pkg-config") ~f:(fun pkg_config ->
{ pkg_config; pkg_config_args; configurator = c })
| Some pkg_config -> Some { pkg_config; pkg_config_args; configurator = c })
| Some pkg_config ->
let pkg_config_args =
match Sys.getenv "PKG_CONFIG_ARGN" with
| s -> String.split ~on:' ' s
| exception Not_found ->
(match ocaml_config_var c "target" with
| None -> []
| Some target -> [ "--personality=" ^ target ])
in
Some { pkg_config; pkg_config_args; configurator = c })
;;

type package_conf =
Expand Down

0 comments on commit c8e3b2d

Please sign in to comment.