]> Kevux Git Server - fll/commitdiff
Regression: Fake static compile not building.
authorKevin Day <thekevinday@gmail.com>
Thu, 17 Feb 2022 07:37:33 +0000 (01:37 -0600)
committerKevin Day <thekevinday@gmail.com>
Thu, 17 Feb 2022 07:37:33 +0000 (01:37 -0600)
The path_sources_object should not be used for the static library sources.

Skip empty data in static build.

Add additional status check.

Cleanup the example-objects sources.

level_3/fake/c/private-build-objects.c
level_3/fake/c/private-build-program.c
level_3/fake/data/projects/example-objects/sources/fake.c
level_3/fake/data/projects/example-objects/sources_object/a.c
level_3/fake/data/projects/example-objects/sources_object/e.c
level_3/fake/data/projects/example-objects/sources_object/f.c
level_3/fake/data/projects/example-objects/sources_object/k.c

index 60d450cd748cda69aa41df226c728159dc1e9453..8c43639208e40a0b0934ceb66b1c35cbc521bada 100644 (file)
@@ -52,15 +52,17 @@ extern "C" {
 
       for (j = 0; j < sources[i]->used; ++j) {
 
+        if (!sources[i]->array[j].used) continue;
+
         file_name.used = 0;
         destination_path.used = 0;
 
-        fake_build_path_source_length(main, data_build, &data_build->setting.path_sources_object, &source);
+        fake_build_path_source_length(main, data_build, &data_build->setting.path_sources, &source);
 
         char source_string[source.used + sources[i]->array[j].used + 1];
         source.string = source_string;
 
-        fake_build_path_source_string(main, data_build, &data_build->setting.path_sources_object, &source);
+        fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
 
         memcpy(source_string + source.used, sources[i]->array[j].string, sources[i]->array[j].used);
         source.used += sources[i]->array[j].used;
index b273e2b2076e189515f95fe370d8068405f27f88..40493a37f6931d9b5eb817ddd3e00a7727f18c9f 100644 (file)
@@ -147,7 +147,7 @@ extern "C" {
       return 0;
     }
 
-    {
+    if (F_status_is_error_not(*status)) {
       f_string_static_t source_library = f_string_static_t_initialize;
       source_library.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used + data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
 
index a7a711c88434c70950ab6863a18347028733acb7..586a50957f459a4668164c4a3dd14ab9404d83c8 100644 (file)
@@ -1,11 +1,11 @@
 #include <stdio.h>
 
-extern void print_f();
-extern void print_a();
-extern void print_k();
-extern void print_e();
+extern void print_f(void);
+extern void print_a(void);
+extern void print_k(void);
+extern void print_e(void);
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[], char *envp[]) {
   print_f();
   print_a();
   print_k();
index f053b3ed9726cfe754be1e72fb7b5c6c5da19f69..7651d7dd0b2f149857fa743b05a8bac26ec34f42 100644 (file)
@@ -1,5 +1,5 @@
 #include <stdio.h>
 
-void print_a() {
+void print_a(void) {
   printf("a");
 }
index 8762738f9ee4f48e2dab0e2e4b95edddd87651e5..3b6b8ed2cce856c84b005fdc77ed067a1343d8a4 100644 (file)
@@ -1,5 +1,5 @@
 #include <stdio.h>
 
-void print_e() {
+void print_e(void) {
   printf("e");
 }
index 19478bbc39d0a24ff38f336a25f6c28cb13fc01a..bde9896ac25249a3fd484ceb5931a7da50540cc9 100644 (file)
@@ -1,5 +1,5 @@
 #include <stdio.h>
 
-void print_f() {
+void print_f(void) {
   printf("f");
 }
index 7cc15b8c736c62773656458ce6f1f51073236258..4a4d9866342ee495a0d2d39e9491b4fe31366311 100644 (file)
@@ -1,5 +1,5 @@
 #include <stdio.h>
 
-void print_k() {
+void print_k(void) {
   printf("k");
 }