Issue Details (XML | Word | Printable)

Key: STDCXX-408
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

make use of __declspec(dll{export,import}) on all platforms

Created: 09/May/07 03:42 PM   Updated: 14/May/08 04:54 PM
Return to search
Component/s: Build and Installation
Affects Version/s: 4.1.2, 4.1.3, 4.1.4, 4.2.0
Fix Version/s: 4.3.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works dllexport.patch 2007-12-19 04:40 PM Farid Zaripov 13 kB
Text File gmake.log 2007-12-19 06:00 PM Farid Zaripov 9 kB
Environment: HP aCC 3.37 and beyond, gcc/Linux
Issue Links:
Reference
 

Patch Info: Patch Available
Severity: Inefficiency


 Description  « Hide
Starting with HP aCC 3.37 the compiler supports the __declspec(dllexport) and __declspec(dllimport) decorators on declarations of symbols with external linkage. According to the Release Notes for the compiler, "Support of these keywords enhances the performance of shared libraries and relieves the usage of HP_DEFINED_EXTERNAL pragmas and +Oextern= list to hide the non-exported symbols." See http://docs.hp.com/en/2212/A-03-37relnotes.html.

We should enable this in our builds.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 29/Aug/07 09:20 PM
This should be pretty straightforward assuming the feature works the same way in aCC as in MSVC and assuming there are no serious bugs in it. Yeah, right. Scheduled for 4.2.1.

Martin Sebor added a comment - 28/Nov/07 05:24 AM
gcc also implements the _declspec(dll{im,ex}port) feature as an alternative to __attribute_((dll{ex,im}port):
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Function-Attributes.html

We might as well implement this enhancement across all platforms.


Farid Zaripov added a comment - 09/Dec/07 12:32 AM
The gcc implements dllexport/dllimport attributes only on Windows and Symbian target platforms (i.e. Cygwin)..

Martin Sebor added a comment - 10/Dec/07 06:33 AM
Affects all released versions.
Assigned to Farid.

Farid Zaripov added a comment - 19/Dec/07 04:40 PM
The patch is attached.

Farid Zaripov added a comment - 19/Dec/07 06:00 PM
The gmake.log file is attached.

Martin Sebor added a comment - 03/Jan/08 08:02 PM
A couple of comments/questions on the patch:

1. Since the name of the attribute is dllexport the name of the config macro should be _RWSTD_NO_DLLEXPORT (no space between DLL and EXPORT).
2. It would be nice if we could avoid #defining _RWSTD_IMPORT and/or _RWSTD_IMPORT in every config test that uses the macro. Is there any way to get the macros #defined in the generated config header?


Farid Zaripov added a comment - 19/Feb/08 07:29 PM
Since the gcc 3.4.4 on Cygwin doesn't exports the template instantiations, declared as __declspec(dllexport), and the latest for this moment gcc 4.2.3 still doesn't correctly exports the virtual function tables (I've got the internal compiler error during linking the strstream example against stdcxx library) I think that __declspec(dllexport/dllimport) feature is unusable on gcc/Cygwin. Also I can't verify this feature on HP aCC because the HP testdrive servers still has the buggy A.06.14 version.

So I deferring this issue to the later time.


Martin Sebor added a comment - 19/Feb/08 08:41 PM
Makes sense. Did you happen to create a test case for the gcc ICE?