Closed Bug 1274334 Opened 9 years ago Closed 2 years ago

Enable STL wrappers on OS X

Categories

(Firefox Build System :: General, enhancement)

Unspecified
macOS
enhancement

Tracking

(firefox114 fixed)

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: jbeich, Assigned: glandium)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1269251 +++ After bug 1269251 OS X would be the only platform still NOT using STL wrappers. However, trying to enable for either old libstdc++ (see bug 1269251 comment 5) or libc++ (see below) fails. /tools/python/bin/python2.7 /builds/slave/try-m64-0000000000000000000000/build/src/sccache/sccache.py /builds/slave/try-m64-0000000000000000000000/build/src/clang/bin/clang++ -arch x86_64 -std=gnu++11 -o GLContextProviderCGL.o -c -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_MACOSX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/slave/try-m64-0000000000000000000000/build/src/gfx/gl -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/gfx/gl -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/ipc/ipdl/_ipdlheaders -I/builds/slave/try-m64-0000000000000000000000/build/src/ipc/chromium/src -I/builds/slave/try-m64-0000000000000000000000/build/src/ipc/glue -I/builds/slave/try-m64-0000000000000000000000/build/src/gfx/skia -I/builds/slave/try-m64-0000000000000000000000/build/src/gfx/skia/skia/include/config -I/builds/slave/try-m64-0000000000000000000000/build/src/gfx/skia/skia/include/core -I/builds/slave/try-m64-0000000000000000000000/build/src/gfx/skia/skia/include/gpu -I/builds/slave/try-m64-0000000000000000000000/build/src/gfx/skia/skia/include/utils -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/nspr -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/mozilla-config.h -MD -MP -MF .deps/GLContextProviderCGL.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wclass-varargs -Wimplicit-fallthrough -Wloop-analysis -Werror=non-literal-null-conversion -Wthread-safety -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-unknown-warning-option -Wno-return-type-c-linkage -isysroot /Developer/SDKs/MacOSX10.7.sdk -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fno-omit-frame-pointer -Werror -I/builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/cairo -Wno-error=shadow -fobjc-exceptions /builds/slave/try-m64-0000000000000000000000/build/src/gfx/gl/GLContextProviderCGL.mm In file included from /builds/slave/try-m64-0000000000000000000000/build/src/gfx/gl/GLContextProviderCGL.mm:6: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/gfx/gl/GLContextProvider.h:10: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/nsAutoPtr.h:10: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/nsCOMPtr.h:23: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/mozilla/AlreadyAddRefed.h:12: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/mozilla/Assertions.h:21: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/nsTraceRefcnt.h:10: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/nscore.h:20: In file included from /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/include/mozilla/mozalloc.h:17: /builds/slave/try-m64-0000000000000000000000/build/src/obj-firefox/x86_64/dist/stl_wrappers/new:14:4: error: "STL code can only be used with -fno-exceptions" # error "STL code can only be used with -fno-exceptions" ^ https://treeherder.mozilla.org/#/jobs?repo=try&revision=a0349816b4b3
Product: Core → Firefox Build System
Severity: normal → S3
Blocks: 1829049

Practically speaking, this doesn't make a huge difference, because
libmozglue contains operator new/operator delete overrides. This will
enable inlining opportunities, though.

It is worth noting that there's equivalent code in
js/src/old-configure.in but it's left as is because it is actually no-op
at the moment. This will be fixed in bug 1829049.

The check for __EXCEPTIONS is replaced with __cpp_exceptions because the
former is defined for any type of exception, including ObjC exceptions,
while the latter is defined for C++ exceptions only.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/0ddf006ab8f0 Enable STL wrappers on macos. r=firefox-build-system-reviewers,ahochheiden

Backed out for causing win2012 bustages on WebGLRenderingContextBinding.h

[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -  In file included from /builds/worker/checkouts/gecko/dom/canvas/ClientWebGLContext.h:15:
[task 2023-04-21T08:41:42.886Z] 08:41:42    ERROR -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGLRenderingContextBinding.h(2386,25): error: expected unqualified-id
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -    static const uint32_t NO_ERROR = 0;
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -                          ^
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -  /builds/worker/fetches/vs/Windows Kits/10/Include/10.0.17134.0/shared/winerror.h(218,18): note: expanded from macro 'NO_ERROR'
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -  #define NO_ERROR 0L                                                 // dderror
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -                   ^
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -  In file included from /builds/worker/checkouts/gecko/dom/canvas/DrawTargetWebgl.cpp:24:
[task 2023-04-21T08:41:42.886Z] 08:41:42     INFO -  In file included from /builds/worker/checkouts/gecko/dom/canvas/ClientWebGLContext.h:16:
[task 2023-04-21T08:41:42.887Z] 08:41:42    ERROR -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGL2RenderingContextBinding.h(652,25): error: expected ')'
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -    static const uint32_t WAIT_FAILED = 37149;
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -                          ^
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  /builds/worker/fetches/vs/Windows Kits/10/Include/10.0.17134.0/um/WinBase.h(108,29): note: expanded from macro 'WAIT_FAILED'
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -                              ^
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGL2RenderingContextBinding.h(652,25): note: to match this '('
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  /builds/worker/fetches/vs/Windows Kits/10/Include/10.0.17134.0/um/WinBase.h(108,21): note: expanded from macro 'WAIT_FAILED'
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  #define WAIT_FAILED ((DWORD)0xFFFFFFFF)
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -                      ^
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  In file included from /builds/worker/checkouts/gecko/dom/canvas/DrawTargetWebgl.cpp:24:
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  In file included from /builds/worker/checkouts/gecko/dom/canvas/ClientWebGLContext.h:16:
[task 2023-04-21T08:41:42.887Z] 08:41:42    ERROR -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WebGL2RenderingContextBinding.h(727,25): error: expected unqualified-id
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -    static const uint32_t NO_ERROR = 0;
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -                          ^
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  /builds/worker/fetches/vs/Windows Kits/10/Include/10.0.17134.0/shared/winerror.h(218,18): note: expanded from macro 'NO_ERROR'
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  #define NO_ERROR 0L                                                 // dderror
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -                   ^
[task 2023-04-21T08:41:42.887Z] 08:41:42     INFO -  3 errors generated.
[task 2023-04-21T08:41:42.887Z] 08:41:42    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:670: DrawTargetWebgl.obj] Error 1
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/35f665d19e3a Enable STL wrappers on macos. r=firefox-build-system-reviewers,ahochheiden

Backed out for causing Gtest failure on STLWrapper

[task 2023-04-21T12:04:21.590Z] 12:04:21     INFO -  TEST-START | STLWrapper.ShouldAbortDeathTest
[task 2023-04-21T12:04:21.716Z] 12:04:21     INFO -  Running GTest tests...
[task 2023-04-21T12:04:21.774Z] 12:04:21  WARNING -  TEST-UNEXPECTED-FAIL | STLWrapper.ShouldAbortDeathTest | Death test: ShouldAbort()
[task 2023-04-21T12:04:21.774Z] 12:04:21     INFO -      Result: died but not with expected error.
[task 2023-04-21T12:04:21.775Z] 12:04:21     INFO -    Expected: contains regular expression "terminate called after throwing an instance of 'std::out_of_range'|vector::_M_range_check"
[task 2023-04-21T12:04:21.775Z] 12:04:21     INFO -  Actual msg:
[task 2023-04-21T12:04:21.775Z] 12:04:21     INFO -  [  DEATH   ] [1409, Unnamed thread 103654970] WARNING: XPCOM object nsStringBuffer addrefed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:216
[task 2023-04-21T12:04:21.775Z] 12:04:21     INFO -  [  DEATH   ] [1409, Unnamed thread 103654970] WARNING: XPCOM object nsStringBuffer addrefed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:216
[task 2023-04-21T12:04:21.776Z] 12:04:21     INFO -  [  DEATH   ] [1409, Unnamed thread 103654970] WARNING: XPCOM object nsStringBuffer addrefed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:216
[task 2023-04-21T12:04:21.776Z] 12:04:21     INFO -  [  DEATH   ] [1409, Unnamed thread 103654970] WARNING: XPCOM object nsStringBuffer addrefed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:216
[task 2023-04-21T12:04:21.776Z] 12:04:21     INFO -  [  DEATH   ] [1409, Unnamed thread 103654970] WARNING: XPCOM object nsStringBuffer addrefed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:216
[task 2023-04-21T12:04:21.777Z] 12:04:21     INFO -  [  DEATH   ] [1409, Unnamed thread 103654970] WARNING: XPCOM object nsStringBuffer addrefed from static ctor/dtor: file /builds/worker/checkouts/gecko/xpcom/base/nsTraceRefcnt.cpp:216
[task 2023-04-21T12:04:21.777Z] 12:04:21     INFO -  [  DEATH   ] *** You are running in headless mode.
[task 2023-04-21T12:04:21.777Z] 12:04:21     INFO -  [  DEATH   ] [Parent 1409, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, nullptr) failed with result 0x80004005 (NS_ERROR_FAILURE): file /builds/worker/checkouts/gecko/toolkit/xre/MultiInstanceLock.cpp:264
[task 2023-04-21T12:04:21.778Z] 12:04:21     INFO -  [  DEATH   ] Setting up crash reporting
[task 2023-04-21T12:04:21.778Z] 12:04:21     INFO -  [  DEATH   ] [Parent 1409, Main Thread] WARNING: OOPDeinit() without successful OOPInit(): file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:3376
[task 2023-04-21T12:04:21.778Z] 12:04:21     INFO -  [  DEATH   ] Redirecting call to abort() to mozalloc_abort
[task 2023-04-21T12:04:21.778Z] 12:04:21     INFO -  [  DEATH   ]
[task 2023-04-21T12:04:21.779Z] 12:04:21     INFO -  [  DEATH   ] Hit MOZ_CRASH(Redirecting call to abort() to mozalloc_abort
[task 2023-04-21T12:04:21.779Z] 12:04:21     INFO -  [  DEATH   ] ) at /builds/worker/checkouts/gecko/memory/mozalloc/mozalloc_abort.cpp:35
[task 2023-04-21T12:04:21.780Z] 12:04:21     INFO -  Initializing stack-fixing for the first stack frame, this may take a while...
[task 2023-04-21T12:04:21.867Z] 12:04:21     INFO -  [  DEATH   ] #01: mozalloc_abort [memory/mozalloc/mozalloc_abort.cpp:35]
[task 2023-04-21T12:04:21.867Z] 12:04:21     INFO -  [  DEATH   ] #02: MOZ_ReportAssertionFailure(char const*, char const*, int) [mfbt/Assertions.h:94]
[task 2023-04-21T12:04:48.496Z] 12:04:48     INFO -  [  DEATH   ] #03: StackWalkTester::RunTest(int) [/opt/worker/tasks/task_168207839091953/build/application/Firefox NightlyDebug.app/Contents/MacOS/gtest/XUL + 0x287129]
[task 2023-04-21T12:04:48.496Z] 12:04:48     INFO -  [  DEATH   ] #04: StackWalkTester::RunTest(int) [/opt/worker/tasks/task_168207839091953/build/application/Firefox NightlyDebug.app/Contents/MacOS/gtest/XUL + 0x27b2a6]
[task 2023-04-21T12:04:48.497Z] 12:04:48     INFO -  [  DEATH   ] #05: testing::Test::Run() [third_party/googletest/googletest/src/gtest.cc:2681]
[task 2023-04-21T12:04:48.497Z] 12:04:48     INFO -  [  DEATH   ] #06: testing::TestInfo::Run() [third_party/googletest/googletest/src/gtest.cc:2856]
[task 2023-04-21T12:04:48.497Z] 12:04:48     INFO -  [  DEATH   ] #07: testing::TestSuite::Run() [third_party/googletest/googletest/src/gtest.cc:3014]
[task 2023-04-21T12:04:48.497Z] 12:04:48     INFO -  [  DEATH   ] #08: testing::internal::UnitTestImpl::RunAllTests() [third_party/googletest/googletest/src/gtest.cc:5871]
[task 2023-04-21T12:04:48.498Z] 12:04:48     INFO -  [  DEATH   ] #09: testing::UnitTest::Run() [third_party/googletest/googletest/src/gtest.cc:5444]
[task 2023-04-21T12:04:48.498Z] 12:04:48     INFO -  [  DEATH   ] #10: mozilla::RunGTestFunc(int*, char**) [testing/gtest/mozilla/GTestRunner.cpp:167]
[task 2023-04-21T12:04:48.498Z] 12:04:48     INFO -  [  DEATH   ] #11: XREMain::XRE_mainStartup(bool*) [toolkit/xre/nsAppRunner.cpp:4667]
[task 2023-04-21T12:04:48.498Z] 12:04:48     INFO -  [  DEATH   ] #12: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp:5822]
[task 2023-04-21T12:04:48.499Z] 12:04:48     INFO -  [  DEATH   ] #13: XRE_main(int, char**, mozilla::BootstrapConfig const&) [toolkit/xre/nsAppRunner.cpp:5890]
[task 2023-04-21T12:04:48.499Z] 12:04:48     INFO -  [  DEATH   ] #14: main [browser/app/nsBrowserApp.cpp:445]
[task 2023-04-21T12:04:48.499Z] 12:04:48     INFO -  [  DEATH   ]  @ /builds/worker/checkouts/gecko/xpcom/tests/gtest/TestSTLWrappers.cpp:58
[task 2023-04-21T12:04:48.499Z] 12:04:48  WARNING -  TEST-UNEXPECTED-FAIL | STLWrapper.ShouldAbortDeathTest | test completed (time: 185ms)
Flags: needinfo?(mh+mozilla)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/bf43611b4c0e Enable STL wrappers on macos. r=firefox-build-system-reviewers,ahochheiden
Type: defect → enhancement
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Regressions: 1832708
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: