@@ -13048,6 +13048,7 @@ val make_custom_rules :
13048
13048
reason_react_jsx : Bsb_config_types.reason_react_jsx option ->
13049
13049
digest:string ->
13050
13050
refmt:string option ->
13051
+ package_specs:Bsb_package_specs.t ->
13051
13052
command Map_string.t ->
13052
13053
builtin
13053
13054
@@ -13177,6 +13178,7 @@ let make_custom_rules
13177
13178
~(reason_react_jsx : Bsb_config_types.reason_react_jsx option)
13178
13179
~(digest : string)
13179
13180
~(refmt : string option) (* set refmt path when needed *)
13181
+ ~(package_specs: Bsb_package_specs.t)
13180
13182
(custom_rules : command Map_string.t) :
13181
13183
builtin =
13182
13184
(** FIXME: We don't need set [-o ${out}] when building ast
@@ -13189,6 +13191,7 @@ let make_custom_rules
13189
13191
Ext_buffer.clear buf;
13190
13192
Ext_buffer.add_string buf "$bsc";
13191
13193
Ext_buffer.add_ninja_prefix_var buf Bsb_ninja_global_vars.g_pkg_flg;
13194
+ Ext_buffer.add_string buf (Bsb_package_specs.package_flag_of_package_specs package_specs "$in_d");
13192
13195
if read_cmi = `yes then
13193
13196
Ext_buffer.add_string buf " -bs-read-cmi";
13194
13197
if is_dev then
@@ -13694,20 +13697,7 @@ let handle_generators oc
13694
13697
)
13695
13698
13696
13699
13697
- let make_common_shadows
13698
- package_specs
13699
- dirname
13700
- : Bsb_ninja_targets.shadow list
13701
- =
13702
-
13703
- [{ key = Bsb_ninja_global_vars.g_pkg_flg;
13704
- op =
13705
- Append
13706
- (Bsb_package_specs.package_flag_of_package_specs
13707
- package_specs dirname
13708
- )
13709
- }]
13710
-
13700
+
13711
13701
13712
13702
type suffixes = {
13713
13703
impl : string;
@@ -13765,10 +13755,6 @@ let emit_module_build
13765
13755
let output_cmj = output_filename_sans_extension ^ Literals.suffix_cmj in
13766
13756
let output_js =
13767
13757
Bsb_package_specs.get_list_of_output_js package_specs output_filename_sans_extension in
13768
- let common_shadows =
13769
- make_common_shadows package_specs
13770
- (Filename.dirname output_cmi)
13771
- in
13772
13758
13773
13759
Bsb_ninja_targets.output_build oc
13774
13760
~outputs:[output_mlast]
@@ -13791,20 +13777,19 @@ let emit_module_build
13791
13777
;
13792
13778
Bsb_ninja_targets.output_build oc
13793
13779
~outputs:[output_cmi]
13794
- ~shadows:common_shadows
13795
13780
~order_only_deps:[output_d]
13796
13781
~inputs:[output_mliast]
13797
13782
~rule:(if is_dev then rules.mi_dev else rules.mi)
13798
13783
;
13799
13784
end;
13800
13785
13801
- let shadows =
13786
+ let shadows : Bsb_ninja_targets.shadow list =
13802
13787
match js_post_build_cmd with
13803
- | None -> common_shadows
13788
+ | None -> []
13804
13789
| Some cmd ->
13805
- {key = Bsb_ninja_global_vars.postbuild;
13806
- op = Overwrite ("&& " ^ cmd ^ Ext_string.single_space ^ String.concat Ext_string.single_space output_js)}
13807
- :: common_shadows
13790
+ [ {key = Bsb_ninja_global_vars.postbuild;
13791
+ op = Overwrite ("&& " ^ cmd ^ Ext_string.single_space ^ String.concat Ext_string.single_space output_js)}]
13792
+
13808
13793
in
13809
13794
let rule =
13810
13795
if has_intf_file then
@@ -14111,6 +14096,7 @@ let output_ninja_and_namespace_map
14111
14096
~has_pp:(pp_file <> None)
14112
14097
~has_builtin:(built_in_dependency <> None)
14113
14098
~reason_react_jsx
14099
+ ~package_specs
14114
14100
~digest
14115
14101
generators in
14116
14102
emit_bsc_lib_includes bs_dependencies source_dirs.lib external_includes namespace oc;
0 commit comments