Clflags.workspace_root needs to be absolute

Since the fix for #262 in 3fb19150 it is necessary for workspace_root to
be absolute. In particular, `jbuilder build -p foo` (which implies
`--root=.`) needs to evaluate what that root is.
This commit is contained in:
David Allsopp 2017-09-29 14:01:54 +01:00
parent 5de73ca740
commit 0e46cdd4e3
1 changed files with 1 additions and 1 deletions

View File

@ -35,9 +35,9 @@ let set_common c ~targets =
Clflags.dev_mode := c.dev_mode;
Clflags.verbose := c.verbose;
Clflags.capture_outputs := c.capture_outputs;
Clflags.workspace_root := c.root;
if c.root <> Filename.current_dir_name then
Sys.chdir c.root;
Clflags.workspace_root := Sys.getcwd ();
Clflags.external_lib_deps_hint :=
List.concat
[ ["jbuilder"; "external-lib-deps"; "--missing"]