Browse Source

dtoolbase: Remove EXPORT_TEMPLATES define

As of f69354d9fa603ac05dfd924af3844f749fd50cdd, this is just always
expected on all platforms. If it's not defined,
TemplateClass<X>::_type_handle won't link correctly with some compilers
(e.g. Clang) and the lack of 'extern template class' will result in
duplicated code in any case. In short, turning it off causes problems.

makepanda also always turns this on, so it doesn't represent any
optional feature or autodetected platform-specific behavior anyway.
Sam Edwards 7 years ago
parent
commit
a4c1b44371
2 changed files with 1 additions and 2 deletions
  1. 1 1
      dtool/src/dtoolbase/dtoolbase_cc.h
  2. 0 1
      makepanda/makepanda.py

+ 1 - 1
dtool/src/dtoolbase/dtoolbase_cc.h

@@ -257,7 +257,7 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
 #endif
 
 
-#if !defined(LINK_ALL_STATIC) && defined(EXPORT_TEMPLATES)
+#ifndef LINK_ALL_STATIC
 // This macro must be used to export an instantiated template class from a
 // DLL.  If the template class name itself contains commas, it may be
 // necessary to first define a macro for the class name, to allow proper macro

+ 0 - 1
makepanda/makepanda.py

@@ -2253,7 +2253,6 @@ DTOOL_CONFIG=[
     ("SUPPORT_FIXED_FUNCTION",         '1',                      '1'),
     ("DO_MEMORY_USAGE",                'UNDEF',                  'UNDEF'),
     ("DO_PIPELINING",                  '1',                      '1'),
-    ("EXPORT_TEMPLATES",               'yes',                    'yes'),
     ("DEFAULT_PATHSEP",                '";"',                    '":"'),
     ("WORDS_BIGENDIAN",                'UNDEF',                  'UNDEF'),
     ("HAVE_NAMESPACE",                 '1',                      '1'),