diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-29 16:45:03 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-30 11:22:15 +0200 |
commit | 2a08d1a05db937f8b1a62422b78ffe2fa07d3ead (patch) | |
tree | d66483e0e8d278a4eb5f59948dc605f728a33466 /Configurations | |
parent | dcdb4028b3981585537c6d57635ea91cd59589fa (diff) | |
download | openssl-2a08d1a05db937f8b1a62422b78ffe2fa07d3ead.zip openssl-2a08d1a05db937f8b1a62422b78ffe2fa07d3ead.tar.gz openssl-2a08d1a05db937f8b1a62422b78ffe2fa07d3ead.tar.bz2 |
Make it possible to specify source files that will only be used for shared libs
There are rare cases when an object file will only be used when
building a shared library. To enable this, we introduce
SHARED_SOURCE:
SHARED_SOURCE[libfoo]=dllmain.c
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/README | 5 | ||||
-rw-r--r-- | Configurations/README.design | 4 | ||||
-rw-r--r-- | Configurations/common.tmpl | 10 |
3 files changed, 16 insertions, 3 deletions
diff --git a/Configurations/README b/Configurations/README index a4c1567..a5a006e 100644 --- a/Configurations/README +++ b/Configurations/README @@ -358,6 +358,11 @@ sense at all to just have a rename like that (why not just use "libbar" everywhere?), it does make sense when it can be used conditionally. See a little further below for an example. +In some cases, it's desirable to include some source files in the +shared form of a library only: + + SHARED_SOURCE[libfoo]=dllmain.c + For any file to be built, it's also possible to tell what extra include paths the build of their source files should use: diff --git a/Configurations/README.design b/Configurations/README.design index 5065960..574982f 100644 --- a/Configurations/README.design +++ b/Configurations/README.design @@ -233,6 +233,10 @@ indexes: SOURCE variables, and AS source files for programs and libraries. + shared_sources => + a hash table just like 'sources', but only as source + files (object files) for building shared libraries. + As an example, here is how the build.info files example from the section above would be digested into a %unified_info table: diff --git a/Configurations/common.tmpl b/Configurations/common.tmpl index d89817e..9c80070 100644 --- a/Configurations/common.tmpl +++ b/Configurations/common.tmpl @@ -92,9 +92,11 @@ $OUT .= libobj2shlib(shlib => $unified_info{sharednames}->{$lib}, lib => $lib, objs => [ map { (my $x = $_) =~ s|\.o$||; $x } - @{$unified_info{sources}->{$lib}} ], + (@{$unified_info{sources}->{$lib}}, + @{$unified_info{shared_sources}->{$lib}}) ], deps => [ reducedepends(resolvedepends($lib)) ], %ordinals); + map { doobj($_, $lib, intent => "lib") } @{$unified_info{shared_sources}->{$lib}}; } $OUT .= obj2lib(lib => $lib, objs => [ map { (my $x = $_) =~ s|\.o$||; $x } @@ -111,9 +113,11 @@ return "" if $cache{$lib}; $OUT .= obj2dso(lib => $lib, objs => [ map { (my $x = $_) =~ s|\.o$||; $x } - @{$unified_info{sources}->{$lib}} ], + (@{$unified_info{sources}->{$lib}}, + @{$unified_info{shared_sources}->{$lib}}) ], deps => [ resolvedepends($lib) ]); - map { doobj($_, $lib, intent => "dso") } @{$unified_info{sources}->{$lib}}; + map { doobj($_, $lib, intent => "dso") } (@{$unified_info{sources}->{$lib}}, + @{$unified_info{shared_sources}->{$lib}}); $cache{$lib} = 1; } |