@@ -302,13 +302,14 @@ fn static_lib_name() -> String {
302
302
format ! ( "{}-cxxqt-generated" , crate_name( ) )
303
303
}
304
304
305
- fn qml_module_static_lib_name ( module_uri : & str ) -> String {
306
- format ! (
307
- "{}-qml-module-{}-cxxqt-generated" ,
308
- crate_name( ) ,
309
- module_name_from_uri( module_uri)
310
- )
311
- }
305
+ // TODO: useful once we have a cc_builder per qml_module
306
+ // fn qml_module_static_lib_name(module_uri: &str) -> String {
307
+ // format!(
308
+ // "{}-qml-module-{}-cxxqt-generated",
309
+ // crate_name(),
310
+ // module_name_from_uri(module_uri)
311
+ // )
312
+ // }
312
313
313
314
fn panic_duplicate_file_and_qml_module (
314
315
path : impl AsRef < Path > ,
@@ -783,13 +784,11 @@ impl CxxQtBuilder {
783
784
) ;
784
785
}
785
786
786
- // Use a separate cc_builder per QML module so we don't have collisions
787
- //
788
- // TODO: for now we copy the global CxxQtBuilder cc_builder
787
+ // TODO: for now we use the global CxxQtBuilder cc_builder
789
788
// this means that any includes/files etc on these are in this builder
790
789
// but we cannot have separate builds until we can configure includes,
791
790
// qt modules, files, cc_builder options etc in the QmlModule itself
792
- let mut cc_builder = self . cc_builder . clone ( ) ;
791
+ let mut cc_builder = & mut self . cc_builder ;
793
792
qtbuild. cargo_link_libraries ( & mut cc_builder) ;
794
793
795
794
let mut moc_include_paths = HashSet :: new ( ) ;
@@ -883,20 +882,23 @@ impl CxxQtBuilder {
883
882
dir:: module_target ( & qml_module. uri ) . join ( "plugin_init.o" ) ,
884
883
) ;
885
884
886
- // Build the QML module as a library
887
- if cc_builder. get_files ( ) . count ( ) > 0 {
888
- let qml_library_name = qml_module_static_lib_name ( & qml_module. uri ) ;
889
-
890
- // The linker argument order matters!
891
- // We need to link the object file first, then link the static library.
892
- // Otherwise, the linker will be unable to find the symbols in the static library file.
893
- // See also: https://stackoverflow.com/questions/45135/why-does-the-order-in-which-libraries-are-linked-sometimes-cause-errors-in-gcc
894
- if !dir:: is_exporting ( ) {
895
- println ! ( "cargo::rustc-link-arg=-l{}" , & qml_library_name) ;
896
- }
897
-
898
- cc_builder. compile ( & qml_library_name) ;
899
- }
885
+ // TODO: once we have a separate cc_builder per qml_module we will
886
+ // need to build the qml module here and link it
887
+ //
888
+ // // Build the QML module as a library
889
+ // if cc_builder.get_files().count() > 0 {
890
+ // let qml_library_name = qml_module_static_lib_name(&qml_module.uri);
891
+
892
+ // // The linker argument order matters!
893
+ // // We need to link the object file first, then link the static library.
894
+ // // Otherwise, the linker will be unable to find the symbols in the static library file.
895
+ // // See also: https://stackoverflow.com/questions/45135/why-does-the-order-in-which-libraries-are-linked-sometimes-cause-errors-in-gcc
896
+ // if !dir::is_exporting() {
897
+ // println!("cargo::rustc-link-arg=-l{}", &qml_library_name);
898
+ // }
899
+
900
+ // cc_builder.compile(&qml_library_name);
901
+ // }
900
902
}
901
903
}
902
904
0 commit comments