Commit Graph

14 Commits

Author SHA1 Message Date
Jérémie Dimino 9585c8f79d
Move ocamldep output files to the object directory (#918)
- this avoid the need for the "already_used" business
- this will make it easier to support multi-dir libraries without copy_files

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-06-28 09:46:20 +01:00
Jeremie Dimino c9ead23c7d Add Compilation_context
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jeremie Dimino 69af40dced Compute includes outside of build_modules
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-05-28 08:10:12 +01:00
Jérémie Dimino 4d8ca489be
Add support for environment & build profiles (#419) 2018-05-04 16:49:25 +01:00
Jeremie Dimino 606ad1b10f Pass around library dependencies as static values
This way we know more of the compilation DAG statically. This helps
for parallelism as well as for `jbuilder external-lib-deps`
2018-04-09 06:31:52 +08:00
Jérémie Dimino 3f22d9f82b
Do not pass -runtime-variant _pic on Windows (#635) 2018-03-19 19:13:02 -04:00
François Bobot feba0827b8 Allow to link executables as static or shared objects (#23)
- Setup the rules to use the `-output-complete-obj` option of OCaml
- Introduce a `best` mode in addition to `byte` and `native`
- Extend the `modes` field of executables to mean "linking modes", and add linking modes for static and shared objects
2018-03-12 11:40:53 +00:00
Rudi Grinberg ddefafa58b Introduce private type for module name 2018-03-06 18:45:38 +07:00
Jeremie Dimino 4dc8d2456f Pass obj_dir explicitely to Exe.build_and_link and don't return it
The only place where we used the default value was gen_rules
2018-02-26 16:05:48 +00:00
Jérémie Dimino 138c920069 Add support for sub-systems
- Add a Sub_system module that allows to register sub-systems
  that are implemented in a single file
- Add a Syntax module to deal with versioned syntaxes

Other changes:
- Add location to all library dependencies in jbuild files, to report
  properly located errors
- Change the type of functions in Lib to return (_, exn) result
  rather than (_, Lib.Error.t With_required_by.t) result, which was
  hard to use
- Remove With_required_by.t as it was unused
- Rename With_required_by to Dep_path
- Cleanup a bit the Exe module, move a lot of stuff that was specific to
  executable stanzas in gen_rules.ml
- Add String_with_vars.Unexpanded.sexp_of_t
- Rework a bit the code in Lib, in particular factorize the code
  for taking the transitive closure of libraries
- Add an ?extra_vars argument to functions that expand variables
  in Super_context
- Fix the printing of dependency path
- Merge the handling of dependency path between the build system and
  the Lib module
2018-02-26 16:05:48 +00:00
Rudi Grinberg 1cb005bb50 Add a way to customize obj dir for executables
Use this function to simplify the obj dir for the utop runner
2018-02-26 01:30:02 +07:00
Jérémie Dimino 3fd3eb8a12
Split src/import.ml into a new library src/stdune (#548)
- make sure type t always come first
- Map.map, Map.fold, ... never pass the key to the callback while Map.mapi, Map.foldi, ... do
- removed the ~key and ~data labels, I find them useless and annoying
- Set.elements --> Set.to_list
- Map.bindings --> Map.to_list
- Map.of_alist --> Map.of_list
- added Ordering.t for comparison functions
- renamed Inl/Inr to Left/Right. The latter seems clearer
- moved List.longest to String.longest
- added a Pp module with a nicer API than Format
2018-02-25 16:35:25 +00:00
Jérémie Dimino 2a531c5d24
Detect when a module is used by several stanzas (#532)
- print a warning
- don't generate several rules for the .d files
- Added tests for multiple rules for .ml.d
2018-02-20 16:44:25 +00:00
Jérémie Dimino 19f1c6f6b3
Add an Exe module to build and link executables (#533) 2018-02-20 16:38:22 +00:00