| OLD | NEW |
| 1 ## Process this file with automake to produce Makefile.in | 1 ## Process this file with automake to produce Makefile.in |
| 2 | 2 |
| 3 # Note: for every library we create, we're explicit about what symbols | 3 # Note: for every library we create, we're explicit about what symbols |
| 4 # we export. In order to avoid complications with C++ mangling, we always | 4 # we export. In order to avoid complications with C++ mangling, we always |
| 5 # use the regexp for of specifying symbols. | 5 # use the regexp for of specifying symbols. |
| 6 | 6 |
| 7 # Make sure that when we re-make ./configure, we get the macros we need | 7 # Make sure that when we re-make ./configure, we get the macros we need |
| 8 ACLOCAL_AMFLAGS = -I m4 | 8 ACLOCAL_AMFLAGS = -I m4 |
| 9 | 9 |
| 10 # This is so we can #include <google/foo> | 10 # This is so we can #include <google/foo> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 # builtins now in any case, but it's best to be explicit in case that | 23 # builtins now in any case, but it's best to be explicit in case that |
| 24 # changes one day. gcc ignores functions it doesn't understand. | 24 # changes one day. gcc ignores functions it doesn't understand. |
| 25 if GCC | 25 if GCC |
| 26 AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual \ | 26 AM_CXXFLAGS += -Wall -Wwrite-strings -Woverloaded-virtual \ |
| 27 -Wno-sign-compare \ | 27 -Wno-sign-compare \ |
| 28 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc \ | 28 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc \ |
| 29 -fno-builtin-calloc -fno-builtin-cfree \ | 29 -fno-builtin-calloc -fno-builtin-cfree \ |
| 30 -fno-builtin-memalign -fno-builtin-posix_memalign \ | 30 -fno-builtin-memalign -fno-builtin-posix_memalign \ |
| 31 -fno-builtin-valloc -fno-builtin-pvalloc | 31 -fno-builtin-valloc -fno-builtin-pvalloc |
| 32 endif GCC | 32 endif GCC |
| 33 if HAVE_W_NO_UNUSED_RESULT |
| 34 AM_CXXFLAGS += -Wno-unused-result |
| 35 endif HAVE_W_NO_UNUSED_RESULT |
| 33 | 36 |
| 34 # The -no-undefined flag allows libtool to generate shared libraries for | 37 # The -no-undefined flag allows libtool to generate shared libraries for |
| 35 # Cygwin and MinGW. LIBSTDCXX_LA_LINKER_FLAG is used to fix a Solaris bug. | 38 # Cygwin and MinGW. LIBSTDCXX_LA_LINKER_FLAG is used to fix a Solaris bug. |
| 36 AM_LDFLAGS = -no-undefined $(LIBSTDCXX_LA_LINKER_FLAG) | 39 AM_LDFLAGS = -no-undefined $(LIBSTDCXX_LA_LINKER_FLAG) |
| 37 | 40 |
| 38 # We know our low-level code cannot trigger an exception. On some | 41 # We know our low-level code cannot trigger an exception. On some |
| 39 # systems, such as cygwin, it would be disastrous if they did, because | 42 # systems, such as cygwin, it would be disastrous if they did, because |
| 40 # the exception handler might call malloc! If our low-level routines | 43 # the exception handler might call malloc! If our low-level routines |
| 41 # raised an exception within the malloc, they'd deadlock. Luckily, | 44 # raised an exception within the malloc, they'd deadlock. Luckily, |
| 42 # we control all this code, and do not need exceptions for it. | 45 # we control all this code, and do not need exceptions for it. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 endif !MINGW | 251 endif !MINGW |
| 249 | 252 |
| 250 ### Unittests | 253 ### Unittests |
| 251 TESTS += low_level_alloc_unittest | 254 TESTS += low_level_alloc_unittest |
| 252 WINDOWS_PROJECTS += vsprojects/low_level_alloc_unittest/low_level_alloc_unittest
.vcproj | 255 WINDOWS_PROJECTS += vsprojects/low_level_alloc_unittest/low_level_alloc_unittest
.vcproj |
| 253 LOW_LEVEL_ALLOC_UNITTEST_INCLUDES = src/base/low_level_alloc.h \ | 256 LOW_LEVEL_ALLOC_UNITTEST_INCLUDES = src/base/low_level_alloc.h \ |
| 254 src/base/basictypes.h \ | 257 src/base/basictypes.h \ |
| 255 src/google/malloc_hook.h \ | 258 src/google/malloc_hook.h \ |
| 256 src/google/malloc_hook_c.h \ | 259 src/google/malloc_hook_c.h \ |
| 257 src/malloc_hook-inl.h \ | 260 src/malloc_hook-inl.h \ |
| 261 src/malloc_hook_mmap_linux.h \ |
| 262 src/malloc_hook_mmap_freebsd.h \ |
| 258 $(SPINLOCK_INCLUDES) \ | 263 $(SPINLOCK_INCLUDES) \ |
| 259 $(LOGGING_INCLUDES) | 264 $(LOGGING_INCLUDES) |
| 260 low_level_alloc_unittest_SOURCES = src/base/low_level_alloc.cc \ | 265 low_level_alloc_unittest_SOURCES = src/base/low_level_alloc.cc \ |
| 261 src/malloc_hook.cc \ | 266 src/malloc_hook.cc \ |
| 262 src/maybe_threads.cc \ | 267 $(MAYBE_THREADS_CC) \ |
| 263 src/tests/low_level_alloc_unittest.cc \ | 268 src/tests/low_level_alloc_unittest.cc \ |
| 264 $(LOW_LEVEL_ALLOC_UNITTEST_INCLUDES) | 269 $(LOW_LEVEL_ALLOC_UNITTEST_INCLUDES) |
| 265 # By default, MallocHook takes stack traces for use by the heap-checker. | 270 # By default, MallocHook takes stack traces for use by the heap-checker. |
| 266 # We don't need that functionality here, so we turn it off to reduce deps. | 271 # We don't need that functionality here, so we turn it off to reduce deps. |
| 267 low_level_alloc_unittest_CXXFLAGS = -DNO_TCMALLOC_SAMPLES | 272 low_level_alloc_unittest_CXXFLAGS = -DNO_TCMALLOC_SAMPLES |
| 268 low_level_alloc_unittest_LDADD = $(LIBSPINLOCK) | 273 low_level_alloc_unittest_LDADD = $(LIBSPINLOCK) |
| 269 | 274 |
| 270 TESTS += atomicops_unittest | 275 TESTS += atomicops_unittest |
| 271 ATOMICOPS_UNITTEST_INCLUDES = src/base/atomicops.h \ | 276 ATOMICOPS_UNITTEST_INCLUDES = src/base/atomicops.h \ |
| 272 src/base/atomicops-internals-macosx.h \ | 277 src/base/atomicops-internals-macosx.h \ |
| 273 src/base/atomicops-internals-windows.h \ | 278 src/base/atomicops-internals-windows.h \ |
| 274 src/base/atomicops-internals-x86.h \ | 279 src/base/atomicops-internals-x86.h \ |
| 275 $(LOGGING_INCLUDES) | 280 $(LOGGING_INCLUDES) |
| 276 atomicops_unittest_SOURCES = src/tests/atomicops_unittest.cc \ | 281 atomicops_unittest_SOURCES = src/tests/atomicops_unittest.cc \ |
| 277 $(ATOMICOPS_UNITTEST_INCLUDES) | 282 $(ATOMICOPS_UNITTEST_INCLUDES) |
| 278 atomicops_unittest_LDADD = $(LIBSPINLOCK) | 283 atomicops_unittest_LDADD = $(LIBSPINLOCK) |
| 279 | 284 |
| 280 | 285 |
| 281 ### ------- stack trace | 286 ### ------- stack trace |
| 282 | 287 |
| 283 if WITH_STACK_TRACE | 288 if WITH_STACK_TRACE |
| 284 | 289 |
| 285 ### The header files we use. We divide into categories based on directory | 290 ### The header files we use. We divide into categories based on directory |
| 286 S_STACKTRACE_INCLUDES = src/stacktrace_config.h \ | 291 S_STACKTRACE_INCLUDES = src/stacktrace_config.h \ |
| 287 src/stacktrace_generic-inl.h \ | 292 src/stacktrace_generic-inl.h \ |
| 288 src/stacktrace_libunwind-inl.h \ | 293 src/stacktrace_libunwind-inl.h \ |
| 294 src/stacktrace_nacl-inl.h \ |
| 289 src/stacktrace_powerpc-inl.h \ | 295 src/stacktrace_powerpc-inl.h \ |
| 290 src/stacktrace_x86_64-inl.h \ | 296 src/stacktrace_x86_64-inl.h \ |
| 291 src/stacktrace_x86-inl.h \ | 297 src/stacktrace_x86-inl.h \ |
| 292 src/stacktrace_win32-inl.h \ | 298 src/stacktrace_win32-inl.h \ |
| 299 src/base/elf_mem_image.h \ |
| 293 src/base/vdso_support.h | 300 src/base/vdso_support.h |
| 301 |
| 294 SG_STACKTRACE_INCLUDES = src/google/stacktrace.h | 302 SG_STACKTRACE_INCLUDES = src/google/stacktrace.h |
| 295 STACKTRACE_INCLUDES = $(S_STACKTRACE_INCLUDES) $(SG_STACKTRACE_INCLUDES) | 303 STACKTRACE_INCLUDES = $(S_STACKTRACE_INCLUDES) $(SG_STACKTRACE_INCLUDES) |
| 296 googleinclude_HEADERS += $(SG_STACKTRACE_INCLUDES) | 304 googleinclude_HEADERS += $(SG_STACKTRACE_INCLUDES) |
| 297 | 305 |
| 298 ### Making the library | 306 ### Making the library |
| 299 noinst_LTLIBRARIES += libstacktrace.la | 307 noinst_LTLIBRARIES += libstacktrace.la |
| 300 libstacktrace_la_SOURCES = src/stacktrace.cc \ | 308 libstacktrace_la_SOURCES = src/stacktrace.cc \ |
| 309 src/base/elf_mem_image.cc \ |
| 301 src/base/vdso_support.cc \ | 310 src/base/vdso_support.cc \ |
| 302 $(STACKTRACE_INCLUDES) | 311 $(STACKTRACE_INCLUDES) |
| 303 libstacktrace_la_LIBADD = $(UNWIND_LIBS) $(LIBSPINLOCK) | 312 libstacktrace_la_LIBADD = $(UNWIND_LIBS) $(LIBSPINLOCK) |
| 304 STACKTRACE_SYMBOLS = '(GetStackTrace|GetStackFrames|GetStackTraceWithContext|Get
StackFramesWithContext)' | 313 STACKTRACE_SYMBOLS = '(GetStackTrace|GetStackFrames|GetStackTraceWithContext|Get
StackFramesWithContext)' |
| 305 libstacktrace_la_LDFLAGS = -export-symbols-regex $(STACKTRACE_SYMBOLS) | 314 libstacktrace_la_LDFLAGS = -export-symbols-regex $(STACKTRACE_SYMBOLS) |
| 306 | 315 |
| 307 ### Unittests | 316 ### Unittests |
| 308 TESTS += stacktrace_unittest | 317 TESTS += stacktrace_unittest |
| 309 STACKTRACE_UNITTEST_INLCUDES = src/config_for_unittests.h \ | 318 STACKTRACE_UNITTEST_INLCUDES = src/config_for_unittests.h \ |
| 310 src/base/commandlineflags.h \ | 319 src/base/commandlineflags.h \ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 src/system-alloc.h \ | 365 src/system-alloc.h \ |
| 357 src/packed-cache-inl.h \ | 366 src/packed-cache-inl.h \ |
| 358 $(SPINLOCK_INCLUDES) \ | 367 $(SPINLOCK_INCLUDES) \ |
| 359 src/tcmalloc_guard.h \ | 368 src/tcmalloc_guard.h \ |
| 360 src/base/commandlineflags.h \ | 369 src/base/commandlineflags.h \ |
| 361 src/base/basictypes.h \ | 370 src/base/basictypes.h \ |
| 362 src/pagemap.h \ | 371 src/pagemap.h \ |
| 363 src/sampler.h \ | 372 src/sampler.h \ |
| 364 src/central_freelist.h \ | 373 src/central_freelist.h \ |
| 365 src/linked_list.h \ | 374 src/linked_list.h \ |
| 375 src/libc_override.h \ |
| 376 src/libc_override_gcc_and_weak.h \ |
| 377 src/libc_override_glibc.h \ |
| 378 src/libc_override_osx.h \ |
| 379 src/libc_override_redefine.h \ |
| 366 src/page_heap.h \ | 380 src/page_heap.h \ |
| 367 src/page_heap_allocator.h \ | 381 src/page_heap_allocator.h \ |
| 368 src/span.h \ | 382 src/span.h \ |
| 369 src/static_vars.h \ | 383 src/static_vars.h \ |
| 370 src/symbolize.h \ | 384 src/symbolize.h \ |
| 371 src/thread_cache.h \ | 385 src/thread_cache.h \ |
| 372 src/stack_trace_table.h \ | 386 src/stack_trace_table.h \ |
| 373 src/base/thread_annotations.h \ | 387 src/base/thread_annotations.h \ |
| 374 src/malloc_hook-inl.h \ | 388 src/malloc_hook-inl.h \ |
| 389 src/malloc_hook_mmap_linux.h \ |
| 390 src/malloc_hook_mmap_freebsd.h \ |
| 375 src/maybe_threads.h | 391 src/maybe_threads.h |
| 376 SG_TCMALLOC_MINIMAL_INCLUDES = src/google/malloc_hook.h \ | 392 SG_TCMALLOC_MINIMAL_INCLUDES = src/google/malloc_hook.h \ |
| 377 src/google/malloc_hook_c.h \ | 393 src/google/malloc_hook_c.h \ |
| 378 src/google/malloc_extension.h \ | 394 src/google/malloc_extension.h \ |
| 379 src/google/malloc_extension_c.h \ | 395 src/google/malloc_extension_c.h \ |
| 380 src/google/stacktrace.h | 396 src/google/stacktrace.h |
| 381 TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL
_INCLUDES) | 397 TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL
_INCLUDES) |
| 382 googleinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES) | 398 googleinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES) |
| 383 | 399 |
| 384 ### Making the library | 400 ### Making the library |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 451 |
| 436 ### Unittests | 452 ### Unittests |
| 437 | 453 |
| 438 # Commented out for the moment because malloc(very_big_num) is broken in | 454 # Commented out for the moment because malloc(very_big_num) is broken in |
| 439 # standard libc! At least, in some situations, some of the time. | 455 # standard libc! At least, in some situations, some of the time. |
| 440 ## TESTS += malloc_unittest | 456 ## TESTS += malloc_unittest |
| 441 ## MALLOC_UNITEST_INCLUDES = src/google/malloc_extension.h \ | 457 ## MALLOC_UNITEST_INCLUDES = src/google/malloc_extension.h \ |
| 442 ## src/google/malloc_hook.h \ | 458 ## src/google/malloc_hook.h \ |
| 443 ## src/google/malloc_hook_c.h \ | 459 ## src/google/malloc_hook_c.h \ |
| 444 ## src/malloc_hook-inl.h \ | 460 ## src/malloc_hook-inl.h \ |
| 461 ## src/malloc_hook_mmap_linux.h \ |
| 462 ## src/malloc_hook_mmap_freebsd.h \ |
| 445 ## src/base/basictypes.h \ | 463 ## src/base/basictypes.h \ |
| 446 ## src/maybe_threads.h | 464 ## src/maybe_threads.h |
| 447 ## malloc_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ | 465 ## malloc_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ |
| 448 ## src/malloc_hook.cc \ | 466 ## src/malloc_hook.cc \ |
| 449 ## src/malloc_extension.cc \ | 467 ## src/malloc_extension.cc \ |
| 450 ## $(MAYBE_THREADS_CC) \ | 468 ## $(MAYBE_THREADS_CC) \ |
| 451 ## $(MALLOC_UNITTEST_INCLUDES) | 469 ## $(MALLOC_UNITTEST_INCLUDES) |
| 452 ## malloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) | 470 ## malloc_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) |
| 453 ## malloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) | 471 ## malloc_unittest_LDFLAGS = $(PTHREAD_CFLAGS) |
| 454 ## malloc_unittest_LDADD = $(PTHREAD_LIBS) | 472 ## malloc_unittest_LDADD = $(PTHREAD_LIBS) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 # -ansi here is just to help ensure the code is bog-standard C. | 608 # -ansi here is just to help ensure the code is bog-standard C. |
| 591 if GCC | 609 if GCC |
| 592 malloc_extension_c_test_CFLAGS += -ansi | 610 malloc_extension_c_test_CFLAGS += -ansi |
| 593 endif GCC | 611 endif GCC |
| 594 malloc_extension_c_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) | 612 malloc_extension_c_test_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) |
| 595 malloc_extension_c_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) | 613 malloc_extension_c_test_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) |
| 596 endif !ENABLE_STATIC | 614 endif !ENABLE_STATIC |
| 597 endif !MINGW | 615 endif !MINGW |
| 598 | 616 |
| 599 if !MINGW | 617 if !MINGW |
| 618 if !OSX |
| 600 TESTS += memalign_unittest | 619 TESTS += memalign_unittest |
| 601 memalign_unittest_SOURCES = src/tests/memalign_unittest.cc \ | 620 memalign_unittest_SOURCES = src/tests/memalign_unittest.cc \ |
| 602 src/tcmalloc.h \ | 621 src/tcmalloc.h \ |
| 603 src/config_for_unittests.h \ | 622 src/config_for_unittests.h \ |
| 604 src/tests/testutil.h src/tests/testutil.cc | 623 src/tests/testutil.h src/tests/testutil.cc |
| 605 memalign_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) | 624 memalign_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) |
| 606 memalign_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) | 625 memalign_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) |
| 607 memalign_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) | 626 memalign_unittest_LDADD = $(LIBTCMALLOC_MINIMAL) $(PTHREAD_LIBS) |
| 627 endif !OSX |
| 608 endif !MINGW | 628 endif !MINGW |
| 609 | 629 |
| 610 TESTS += page_heap_test | 630 TESTS += page_heap_test |
| 611 WINDOWS_PROJECTS += vsprojects/page_heap_test/page_heap_test.vcproj | 631 WINDOWS_PROJECTS += vsprojects/page_heap_test/page_heap_test.vcproj |
| 612 page_heap_test_SOURCES = src/tests/page_heap_test.cc \ | 632 page_heap_test_SOURCES = src/tests/page_heap_test.cc \ |
| 613 src/config_for_unittests.h \ | 633 src/config_for_unittests.h \ |
| 614 src/base/logging.h \ | 634 src/base/logging.h \ |
| 615 src/common.h \ | 635 src/common.h \ |
| 616 src/page_heap.h | 636 src/page_heap.h |
| 617 page_heap_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) | 637 page_heap_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 -DDEBUGALLOCATION | 740 -DDEBUGALLOCATION |
| 721 tcmalloc_minimal_debug_unittest_LDFLAGS = $(tcmalloc_minimal_unittest_LDFLAGS) | 741 tcmalloc_minimal_debug_unittest_LDFLAGS = $(tcmalloc_minimal_unittest_LDFLAGS) |
| 722 tcmalloc_minimal_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_L
IBS) | 742 tcmalloc_minimal_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_L
IBS) |
| 723 | 743 |
| 724 TESTS += malloc_extension_debug_test | 744 TESTS += malloc_extension_debug_test |
| 725 malloc_extension_debug_test_SOURCES = $(malloc_extension_test_SOURCES) | 745 malloc_extension_debug_test_SOURCES = $(malloc_extension_test_SOURCES) |
| 726 malloc_extension_debug_test_CXXFLAGS = $(malloc_extension_test_CXXFLAGS) | 746 malloc_extension_debug_test_CXXFLAGS = $(malloc_extension_test_CXXFLAGS) |
| 727 malloc_extension_debug_test_LDFLAGS = $(malloc_extension_test_LDFLAGS) | 747 malloc_extension_debug_test_LDFLAGS = $(malloc_extension_test_LDFLAGS) |
| 728 malloc_extension_debug_test_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS) | 748 malloc_extension_debug_test_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS) |
| 729 | 749 |
| 750 if !MINGW |
| 751 if !OSX |
| 730 TESTS += memalign_debug_unittest | 752 TESTS += memalign_debug_unittest |
| 731 memalign_debug_unittest_SOURCES = $(memalign_unittest_SOURCES) | 753 memalign_debug_unittest_SOURCES = $(memalign_unittest_SOURCES) |
| 732 memalign_debug_unittest_CXXFLAGS = $(memalign_unittest_CXXFLAGS) | 754 memalign_debug_unittest_CXXFLAGS = $(memalign_unittest_CXXFLAGS) |
| 733 memalign_debug_unittest_LDFLAGS = $(memalign_unittest_LDFLAGS) | 755 memalign_debug_unittest_LDFLAGS = $(memalign_unittest_LDFLAGS) |
| 734 memalign_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS) | 756 memalign_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS) |
| 757 endif !OSX |
| 758 endif !MINGW |
| 735 | 759 |
| 736 TESTS += realloc_debug_unittest | 760 TESTS += realloc_debug_unittest |
| 737 realloc_debug_unittest_SOURCES = $(realloc_unittest_SOURCES) | 761 realloc_debug_unittest_SOURCES = $(realloc_unittest_SOURCES) |
| 738 realloc_debug_unittest_CXXFLAGS = $(realloc_unittest_CXXFLAGS) | 762 realloc_debug_unittest_CXXFLAGS = $(realloc_unittest_CXXFLAGS) |
| 739 realloc_debug_unittest_LDFLAGS = $(realloc_unittest_LDFLAGS) | 763 realloc_debug_unittest_LDFLAGS = $(realloc_unittest_LDFLAGS) |
| 740 realloc_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS) | 764 realloc_debug_unittest_LDADD = libtcmalloc_minimal_debug.la $(PTHREAD_LIBS) |
| 741 | 765 |
| 742 # debugallocation_test checks that we print a proper stacktrace when | 766 # debugallocation_test checks that we print a proper stacktrace when |
| 743 # debug-allocs fail, so we can't run it if we don't have stacktrace info. | 767 # debug-allocs fail, so we can't run it if we don't have stacktrace info. |
| 744 if WITH_STACK_TRACE | 768 if WITH_STACK_TRACE |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 # link line in order to get dependency ordering right. This is ok: | 869 # link line in order to get dependency ordering right. This is ok: |
| 846 # convenience libraries are .a's, so tcmalloc is still the last .so. | 870 # convenience libraries are .a's, so tcmalloc is still the last .so. |
| 847 # We also put pthreads after tcmalloc, because some pthread | 871 # We also put pthreads after tcmalloc, because some pthread |
| 848 # implementations define their own malloc, and we need to go on the | 872 # implementations define their own malloc, and we need to go on the |
| 849 # first linkline to make sure our malloc 'wins'. | 873 # first linkline to make sure our malloc 'wins'. |
| 850 tcmalloc_unittest_LDADD = $(LIBTCMALLOC) liblogging.la $(PTHREAD_LIBS) | 874 tcmalloc_unittest_LDADD = $(LIBTCMALLOC) liblogging.la $(PTHREAD_LIBS) |
| 851 | 875 |
| 852 # This makes sure it's safe to link in both tcmalloc and | 876 # This makes sure it's safe to link in both tcmalloc and |
| 853 # tcmalloc_minimal. (One would never do this on purpose, but perhaps | 877 # tcmalloc_minimal. (One would never do this on purpose, but perhaps |
| 854 # by accident...) When we can compile libprofiler, we also link it in | 878 # by accident...) When we can compile libprofiler, we also link it in |
| 855 # to make sure that works too. | 879 # to make sure that works too. NOTE: On OS X, it's *not* safe to |
| 856 | 880 # link both in (we end up with two copies of every global var, and |
| 857 TESTS += tcmalloc_both_unittest | 881 # the code tends to pick one arbitrarily), so don't run the test there. |
| 858 tcmalloc_both_unittest_SOURCES = src/tests/tcmalloc_unittest.cc \ | 882 # (We define these outside the 'if' because they're reused below.) |
| 859 src/tests/testutil.h src/tests/testutil.cc \ | 883 tcmalloc_both_unittest_srcs = src/tests/tcmalloc_unittest.cc \ |
| 860 $(TCMALLOC_UNITTEST_INCLUDES) | 884 src/tests/testutil.h src/tests/testutil.cc \ |
| 861 tcmalloc_both_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) | 885 $(TCMALLOC_UNITTEST_INCLUDES) |
| 862 tcmalloc_both_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) | 886 tcmalloc_both_unittest_cflags = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) |
| 887 tcmalloc_both_unittest_lflags = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) |
| 863 if WITH_CPU_PROFILER | 888 if WITH_CPU_PROFILER |
| 864 # We want libtcmalloc last on the link line, but due to a bug in | 889 # We want libtcmalloc last on the link line, but due to a bug in |
| 865 # libtool involving convenience libs, they need to come last on the | 890 # libtool involving convenience libs, they need to come last on the |
| 866 # link line in order to get dependency ordering right. This is ok: | 891 # link line in order to get dependency ordering right. This is ok: |
| 867 # convenience libraries are .a's, so tcmalloc is still the last .so. | 892 # convenience libraries are .a's, so tcmalloc is still the last .so. |
| 868 # We also put pthreads after tcmalloc, because some pthread | 893 # We also put pthreads after tcmalloc, because some pthread |
| 869 # implementations define their own malloc, and we need to go on the | 894 # implementations define their own malloc, and we need to go on the |
| 870 # first linkline to make sure our malloc 'wins'. | 895 # first linkline to make sure our malloc 'wins'. |
| 871 tcmalloc_both_unittest_LDADD = $(LIBTCMALLOC) $(LIBTCMALLOC_MINIMAL) \ | 896 tcmalloc_both_unittest_ladd = $(LIBTCMALLOC) $(LIBTCMALLOC_MINIMAL) \ |
| 872 libprofiler.la liblogging.la $(PTHREAD_LIBS) | 897 libprofiler.la liblogging.la $(PTHREAD_LIBS) |
| 873 else | 898 else |
| 874 tcmalloc_both_unittest_LDADD = $(LIBTCMALLOC) $(LIBTCMALLOC_MINIMAL) \ | 899 tcmalloc_both_unittest_ladd = $(LIBTCMALLOC) $(LIBTCMALLOC_MINIMAL) \ |
| 875 liblogging.la $(PTHREAD_LIBS) | 900 liblogging.la $(PTHREAD_LIBS) |
| 876 endif !WITH_CPU_PROFILER | 901 endif !WITH_CPU_PROFILER |
| 902 if !OSX |
| 903 TESTS += tcmalloc_both_unittest |
| 904 tcmalloc_both_unittest_SOURCES = $(tcmalloc_both_unittest_srcs) |
| 905 tcmalloc_both_unittest_CXXFLAGS = $(tcmalloc_both_unittest_cflags) |
| 906 tcmalloc_both_unittest_LDFLAGS = $(tcmalloc_both_unittest_lflags) |
| 907 tcmalloc_both_unittest_LDADD = $(tcmalloc_both_unittest_ladd) |
| 908 endif !OSX |
| 877 | 909 |
| 878 TESTS += tcmalloc_large_unittest | 910 TESTS += tcmalloc_large_unittest |
| 879 tcmalloc_large_unittest_SOURCES = src/tests/tcmalloc_large_unittest.cc | 911 tcmalloc_large_unittest_SOURCES = src/tests/tcmalloc_large_unittest.cc |
| 880 tcmalloc_large_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) | 912 tcmalloc_large_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) |
| 881 tcmalloc_large_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) | 913 tcmalloc_large_unittest_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) |
| 882 tcmalloc_large_unittest_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS) | 914 tcmalloc_large_unittest_LDADD = $(LIBTCMALLOC) $(PTHREAD_LIBS) |
| 883 | 915 |
| 884 TESTS += raw_printer_test | 916 TESTS += raw_printer_test |
| 885 raw_printer_test_SOURCES = src/tests/raw_printer_test.cc | 917 raw_printer_test_SOURCES = src/tests/raw_printer_test.cc |
| 886 raw_printer_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) | 918 raw_printer_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 # about .so versioning. I just give the libtcmalloc version number. | 1246 # about .so versioning. I just give the libtcmalloc version number. |
| 1215 # TODO(csilvers): use -export-symbols-regex? | 1247 # TODO(csilvers): use -export-symbols-regex? |
| 1216 libtcmalloc_and_profiler_la_LDFLAGS = $(PTHREAD_CFLAGS) \ | 1248 libtcmalloc_and_profiler_la_LDFLAGS = $(PTHREAD_CFLAGS) \ |
| 1217 -version-info @TCMALLOC_SO_VERSION@ | 1249 -version-info @TCMALLOC_SO_VERSION@ |
| 1218 # We don't include libprofiler_la_LIBADD here because all it adds is | 1250 # We don't include libprofiler_la_LIBADD here because all it adds is |
| 1219 # libstacktrace.la, which we already get via libtcmalloc. Trying to | 1251 # libstacktrace.la, which we already get via libtcmalloc. Trying to |
| 1220 # specify it twice causes link-time duplicate-definition errors. :-( | 1252 # specify it twice causes link-time duplicate-definition errors. :-( |
| 1221 libtcmalloc_and_profiler_la_LIBADD = $(libtcmalloc_la_LIBADD) | 1253 libtcmalloc_and_profiler_la_LIBADD = $(libtcmalloc_la_LIBADD) |
| 1222 | 1254 |
| 1223 TESTS += tcmalloc_and_profiler_unittest | 1255 TESTS += tcmalloc_and_profiler_unittest |
| 1224 tcmalloc_and_profiler_unittest_SOURCES = $(tcmalloc_both_unittest_SOURCES) | 1256 tcmalloc_and_profiler_unittest_SOURCES = $(tcmalloc_both_unittest_srcs) |
| 1225 tcmalloc_and_profiler_unittest_CXXFLAGS = $(tcmalloc_both_unittest_CXXFLAGS) | 1257 tcmalloc_and_profiler_unittest_CXXFLAGS = $(tcmalloc_both_unittest_cflags) |
| 1226 tcmalloc_and_profiler_unittest_LDFLAGS = $(tcmalloc_both_unittest_LDFLAGS) | 1258 tcmalloc_and_profiler_unittest_LDFLAGS = $(tcmalloc_both_unittest_lflags) |
| 1227 tcmalloc_and_profiler_unittest_LDADD = libtcmalloc_and_profiler.la | 1259 tcmalloc_and_profiler_unittest_LDADD = libtcmalloc_and_profiler.la |
| 1228 | 1260 |
| 1229 LIBS_TO_WEAKEN += libtcmalloc_and_profiler.la | 1261 LIBS_TO_WEAKEN += libtcmalloc_and_profiler.la |
| 1230 | 1262 |
| 1231 endif WITH_CPU_PROFILER | 1263 endif WITH_CPU_PROFILER |
| 1232 endif WITH_HEAP_PROFILER_OR_CHECKER | 1264 endif WITH_HEAP_PROFILER_OR_CHECKER |
| 1233 | 1265 |
| 1234 ## ^^^^ END OF RULES TO MAKE YOUR LIBRARIES, BINARIES, AND UNITTESTS | 1266 ## ^^^^ END OF RULES TO MAKE YOUR LIBRARIES, BINARIES, AND UNITTESTS |
| 1235 | 1267 |
| 1236 | 1268 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1262 # try to rewrite exec_prefix, libdir, and includedir in terms of | 1294 # try to rewrite exec_prefix, libdir, and includedir in terms of |
| 1263 # prefix, if possible. | 1295 # prefix, if possible. |
| 1264 libtcmalloc.pc: Makefile packages/rpm/rpm.spec | 1296 libtcmalloc.pc: Makefile packages/rpm/rpm.spec |
| 1265 echo 'prefix=$(prefix)' > "$@".tmp | 1297 echo 'prefix=$(prefix)' > "$@".tmp |
| 1266 echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}
@'` >> "$@".tmp | 1298 echo 'exec_prefix='`echo '$(exec_prefix)' | sed 's@^$(prefix)@$${prefix}
@'` >> "$@".tmp |
| 1267 echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}
@'` >> "$@".tmp | 1299 echo 'libdir='`echo '$(libdir)' | sed 's@^$(exec_prefix)@$${exec_prefix}
@'` >> "$@".tmp |
| 1268 echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'
` >> "$@".tmp | 1300 echo 'includedir='`echo '$(includedir)' | sed 's@^$(prefix)@$${prefix}@'
` >> "$@".tmp |
| 1269 echo '' >> "$@".tmp | 1301 echo '' >> "$@".tmp |
| 1270 echo 'Name: $(PACKAGE)' >> "$@".tmp | 1302 echo 'Name: $(PACKAGE)' >> "$@".tmp |
| 1271 echo 'Version: $(VERSION)' >> "$@".tmp | 1303 echo 'Version: $(VERSION)' >> "$@".tmp |
| 1272 » -grep '^Summary:' packages/rpm/rpm.spec | sed s/^Summary:/Description:/
| head -n1 >> "$@".tmp | 1304 » -grep '^Summary:' $(top_srcdir)/packages/rpm/rpm.spec | sed s/^Summary:/
Description:/ | head -n1 >> "$@".tmp |
| 1273 » -grep '^URL: ' packages/rpm/rpm.spec >> "$@".tmp | 1305 » -grep '^URL: ' $(top_srcdir)/packages/rpm/rpm.spec >> "$@".tmp |
| 1274 echo 'Requires:' >> "$@".tmp | 1306 echo 'Requires:' >> "$@".tmp |
| 1275 echo 'Libs: -L$${libdir} -ltcmalloc' >> "$@".tmp | 1307 echo 'Libs: -L$${libdir} -ltcmalloc' >> "$@".tmp |
| 1276 echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp | 1308 echo 'Libs.private: $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)' >> "$@".tmp |
| 1277 echo 'Cflags: -I$${includedir}' >> "$@".tmp | 1309 echo 'Cflags: -I$${includedir}' >> "$@".tmp |
| 1278 mv -f "$@".tmp "$@" | 1310 mv -f "$@".tmp "$@" |
| 1279 | 1311 |
| 1280 # The other versions are mostly the same. | 1312 # The other versions are mostly the same. |
| 1281 libtcmalloc_minimal.pc: libtcmalloc.pc | 1313 libtcmalloc_minimal.pc: libtcmalloc.pc |
| 1282 cat libtcmalloc.pc | sed s/-ltcmalloc/-ltcmalloc_minimal/ > "$@" | 1314 cat libtcmalloc.pc | sed s/-ltcmalloc/-ltcmalloc_minimal/ > "$@" |
| 1283 | 1315 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1297 dist-hook: | 1329 dist-hook: |
| 1298 test -e "$(distdir)/vsprojects" \ | 1330 test -e "$(distdir)/vsprojects" \ |
| 1299 && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ | 1331 && chmod -R u+w $(distdir)/*.sln $(distdir)/vsprojects/ |
| 1300 | 1332 |
| 1301 EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb
\ | 1333 EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb
\ |
| 1302 $(SCRIPTS) libtool \ | 1334 $(SCRIPTS) libtool \ |
| 1303 src/windows/get_mangled_names.cc src/windows/override_functions.cc
\ | 1335 src/windows/get_mangled_names.cc src/windows/override_functions.cc
\ |
| 1304 src/windows/config.h src/windows/google/tcmalloc.h \ | 1336 src/windows/config.h src/windows/google/tcmalloc.h \ |
| 1305 $(WINDOWS_PROJECTS) \ | 1337 $(WINDOWS_PROJECTS) \ |
| 1306 src/solaris/libstdc++.la | 1338 src/solaris/libstdc++.la |
| OLD | NEW |