Build: pass attributes down to make rule generators
authorRichard Levitte <levitte@openssl.org>
Wed, 7 Nov 2018 10:10:50 +0000 (11:10 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 22 Jan 2019 11:35:39 +0000 (12:35 +0100)
For good measure, we pass down attributes when calling obj2shlib,
obj2lib, obj2dso, obj2bin, or in2script.  We currently don't use them
in our build file templates, but might as well for future use.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7581)

Configurations/common.tmpl

index 9e07a6f112e49a9e75a75373bc9f01265ea9a6ec..132852ce75f87d3cd0864001a0f9a433a32f1eb0 100644 (file)
      unless ($disabled{shared} || $lib =~ /\.a$/) {
          my $obj2shlib = defined &obj2shlib ? \&obj2shlib : \&libobj2shlib;
          $OUT .= $obj2shlib->(lib => $lib,
+                              attrs => $unified_info{attributes}->{$lib},
                               objs => $unified_info{shared_sources}->{$lib},
                               deps => [ reducedepends(resolvedepends($lib)) ],
                               installed => is_installed($lib));
          }
      }
      $OUT .= obj2lib(lib => $lib,
+                     attrs => $unified_info{attributes}->{$lib},
                      objs => [ @{$unified_info{sources}->{$lib}} ]);
      foreach (@{$unified_info{sources}->{$lib}}) {
          doobj($_, $lib, intent => "lib", installed => is_installed($lib));
      my $lib = shift;
      return "" if $cache{$lib};
      $OUT .= obj2dso(lib => $lib,
+                     attrs => $unified_info{attributes}->{$lib},
                      objs => $unified_info{shared_sources}->{$lib},
                      deps => [ resolvedepends($lib) ],
                      installed => is_installed($lib));
      return "" if $cache{$bin};
      my $deps = [ reducedepends(resolvedepends($bin)) ];
      $OUT .= obj2bin(bin => $bin,
+                     attrs => $unified_info{attributes}->{$bin},
                      objs => [ @{$unified_info{sources}->{$bin}} ],
                      deps => $deps,
                      installed => is_installed($bin));
      my $script = shift;
      return "" if $cache{$script};
      $OUT .= in2script(script => $script,
+                       attrs => $unified_info{attributes}->{$script},
                        sources => $unified_info{sources}->{$script},
                        installed => is_installed($script));
      $cache{$script} = 1;