diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-10-31 15:54:21 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-10-31 15:54:21 -0400 |
commit | 107e03ea13e0eba9c33f120f0d95ac9fefc7dcad (patch) | |
tree | 00191b7ccb83fe436ad61bdbb43b523f431c6698 /cpp/src/slice2objc/Gen.cpp | |
parent | Update 3.7 changelog (diff) | |
download | ice-107e03ea13e0eba9c33f120f0d95ac9fefc7dcad.tar.bz2 ice-107e03ea13e0eba9c33f120f0d95ac9fefc7dcad.tar.xz ice-107e03ea13e0eba9c33f120f0d95ac9fefc7dcad.zip |
Replaced slice compiler options --ice, --underscore and --dll-export by
global metadata directives (ice-prefix, underscore, cpp:dll-export:SYMBOL and objc:dll-export:SYMBOL)
Added new cs:tie and java:tie metadata
Diffstat (limited to 'cpp/src/slice2objc/Gen.cpp')
-rw-r--r-- | cpp/src/slice2objc/Gen.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index 9d51de398e4..794570bc4d0 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -690,6 +690,21 @@ Slice::Gen::generate(const UnitPtr& p) { ObjCGenerator::validateMetaData(p); + // + // Give precedence to --dll-export command-line option + // + if(_dllExport.empty()) + { + DefinitionContextPtr dc = p->findDefinitionContext(p->topLevelFile()); + assert(dc); + static const string dllExportPrefix = "objc:dll-export:"; + string meta = dc->findMetaData(dllExportPrefix); + if(meta.size() > dllExportPrefix.size()) + { + _dllExport = meta.substr(dllExportPrefix.size()); + } + } + _H << sp << nl << "#import <objc/Ice/Config.h>"; if(p->hasNonLocalClassDecls()) { |