Changeset 96881 in webkit for trunk/Source/JavaScriptCore/wtf


Ignore:
Timestamp:
Oct 6, 2011, 5:34:05 PM (14 years ago)
Author:
[email protected]
Message:

When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors
https://bugs.webkit.org/show_bug.cgi?id=69586

Reviewed by Darin Adler.

../JavaScriptCore:

  • Configurations/Base.xcconfig:

Add -Wglobal-constructors and -Wexit-time-destructors when building with clang.

When building with clang, we don't need to run the check-for-global-initializers and
check-for-exit-time-destructors anymore.

  • jsc.cpp:

(runInteractive):
Move interpreterName into runInteractive.

  • wtf/StdLibExtras.h:

When building with clang, disable the -Wglobal-constructors and -Wexit-time-destructors
warnings around the variable declaration.

../JavaScriptGlue:

  • Configurations/Base.xcconfig:

Add -Wglobal-constructors and -Wexit-time-destructors when building with clang.

  • JavaScriptGlue.xcodeproj/project.pbxproj:

When building with clang, we don't need to run the check-for-global-initializers and
check-for-exit-time-destructors anymore.

../WebCore:

  • Configurations/Base.xcconfig:

Add -Wglobal-constructors and -Wexit-time-destructors when building with clang.

  • WebCore.xcodeproj/project.pbxproj:

When building with clang, we don't need to run the check-for-global-initializers and
check-for-exit-time-destructors anymore.

  • platform/graphics/filters/FEGaussianBlur.cpp:

(gaussianKernelFactor):
(WebCore::FEGaussianBlur::calculateKernelSize):
(WebCore::FEGaussianBlur::calculateStdDeviation):
Change the gaussian kernel factor global to be an inline function instead.

../WebKit:

  • WebKit.xcodeproj/project.pbxproj:

When building with clang, we don't need to run the check-for-global-initializers and
check-for-exit-time-destructors anymore.

../WebKit/mac:

  • Configurations/Base.xcconfig:

Add -Wglobal-constructors and -Wexit-time-destructors when building with clang.

../WebKit2:

  • Configurations/Base.xcconfig:

Add -Wglobal-constructors and -Wexit-time-destructors when building with clang.

  • WebKit2.xcodeproj/project.pbxproj:

When building with clang, we don't need to run the check-for-global-initializers and
check-for-exit-time-destructors anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/wtf/StdLibExtras.h

    r96880 r96881  
    4545
    4646// Use this macro to declare and define a debug-only global variable that may have a
    47 // non-trivial constructor and destructor.
     47// non-trivial constructor and destructor. When building with clang, this will suppress
     48// warnings about global constructors and exit-time destructors.
    4849#ifndef NDEBUG
     50#if COMPILER(CLANG)
     51#define DEFINE_DEBUG_ONLY_GLOBAL(type, name, arguments) \
     52    _Pragma("clang diagnostic push") \
     53    _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \
     54    _Pragma("clang diagnostic ignored \"-Wexit-time-destructors\"") \
     55    static type name arguments; \
     56    _Pragma("clang diagnostic pop")
     57#else
    4958#define DEFINE_DEBUG_ONLY_GLOBAL(type, name, arguments) \
    5059    static type name arguments;
     60#endif // COMPILER(CLANG)
    5161#else
    5262#define DEFINE_DEBUG_ONLY_GLOBAL(type, name, arguments)
Note: See TracChangeset for help on using the changeset viewer.