Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005963OCaml-for ocamlbuild use https://github.com/ocaml/ocamlbuild/issuespublic2013-03-27 11:592017-03-01 17:10
Reporterhcarty 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Product Version4.00.1 
Target VersionFixed in Version 
Summary0005963: Include support for rpath and static linking flags in ocamlbuild
DescriptionThese are rather straightforward to support with command line flags or a myocamlbuild.ml plugin. It would be nice to have more robust support in the ocamlbuild tool itself though. For example, the sample plugin I've included only supports a single 'link.rpath' file. It would be nice to have the name of the file come from the matching executable target (foo.rpath -> foo.native).
Steps To ReproduceAn example myocamlbuild.ml which:
1. Creates an 'rpath' tag and reads link path information from "link.rpath"
2. Creates a 'static' tag for fully statically linked executables

  open Ocamlbuild_plugin
  
  let rpaths = string_list_of_file "link.rpath"
  let static_flags = S [A "-cclib"; A "-static"]
  
  let () = dispatch begin function
      | After_rules ->
        List.iter (
          fun path ->
            let rpath_flags = S [A "-cclib"; A ("-Wl,-rpath," ^ path)] in
            flag ["ocaml"; "link"; "program"; "rpath"] rpath_flags;
            flag ["ocaml"; "link"; "library"; "rpath"] rpath_flags;
        ) rpaths;
        flag ["ocaml"; "link"; "program"; "static"] static_flags;
      | _ -> ()
    end
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0017529)
doligez (administrator)
2017-03-01 17:10

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to https://github.com/ocaml/ocamlbuild/issues/199 [^]

- Issue History
Date Modified Username Field Change
2013-03-27 11:59 hcarty New Issue
2013-06-19 15:22 doligez Status new => acknowledged
2017-02-23 16:34 doligez Category OCamlbuild (the tool) => for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues [^]
2017-02-23 16:44 doligez Category for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues [^] => -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues [^]
2017-03-01 17:10 doligez Note Added: 0017529
2017-03-01 17:10 doligez Status acknowledged => resolved
2017-03-01 17:10 doligez Resolution open => suspended


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker