diff options
-rwxr-xr-x | emcc | 8 | ||||
-rw-r--r-- | system/lib/dlmalloc.c | 6 | ||||
-rwxr-xr-x | tests/runner.py | 28 | ||||
-rw-r--r-- | tools/shared.py | 2 |
4 files changed, 34 insertions, 10 deletions
@@ -1232,14 +1232,6 @@ try: # We need to build and link the library in if DEBUG: print >> sys.stderr, 'emcc: including %s' % name libfile = shared.Cache.get(name, create) - if has and len(has) > 0: - # remove the symbols we do not need - fixed = in_temp(uniquename(libfile)) + '.bc' - shutil.copyfile(libfile, fixed) - for haz in has: - if DEBUG: print >> sys.stderr, 'emcc: including: removing symbol "%s" that we have' % haz - shared.Building.remove_symbol(fixed, haz) - libfile = fixed extra_files_to_link.append(libfile) force = True if fix and need: diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c index 7e04a726..9a84d48f 100644 --- a/system/lib/dlmalloc.c +++ b/system/lib/dlmalloc.c @@ -532,6 +532,10 @@ #define DLMALLOC_VERSION 20806 #endif /* DLMALLOC_VERSION */ +#if EMSCRIPTEN +#define DLMALLOC_EXPORT __attribute__((__weak__, __visibility__("default"))) +#endif + #ifndef DLMALLOC_EXPORT #define DLMALLOC_EXPORT extern #endif @@ -6291,4 +6295,4 @@ int mspace_mallopt(int param_number, int value) { * Based loosely on libg++-1.2X malloc. (It retains some of the overall structure of old version, but most details differ.) - */
\ No newline at end of file + */ diff --git a/tests/runner.py b/tests/runner.py index f0b5445c..e3b62110 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6245,6 +6245,34 @@ def process(filename): } ''' self.do_run(src, "some string constant") + + def test_std_cout_new(self): + src = ''' + #include <iostream> + + struct NodeInfo { //structure that we want to transmit to our shaders + float x; + float y; + float s; + float c; + }; + const int nbNodes = 100; + NodeInfo * data = new NodeInfo[nbNodes]; //our data that will be transmitted using float texture. + + template<int i> + void printText( const char (&text)[ i ] ) + { + std::cout << text << std::endl; + } + + int main() + { + printText( "some string constant" ); + return 0; + } + ''' + + self.do_run(src, "some string constant") def test_istream(self): if self.emcc_args is None: return self.skip('requires libcxx') diff --git a/tools/shared.py b/tools/shared.py index 7514171c..c4efc974 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -181,7 +181,7 @@ def check_node_version(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.3.4' +EMSCRIPTEN_VERSION = '1.3.5' def check_sanity(force=False): try: |