Closed Bug 1312309 Opened 9 years ago Closed 9 years ago

Fails to build jsoncpp with clang-cl

Categories

(Toolkit :: Crash Reporting, defect)

Unspecified
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: ting, Assigned: ting)

References

Details

Attachments

(1 file, 1 obsolete file)

clang-cl now does not have "-fexceptions" a core option, see: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150713/133143.html clang: r284701 error: 1:35.06 clang-cl.exe: warning: unknown argument ignored in clang-cl: '-fexceptions' [-Wunknown-argument] 1:35.06 In file included from c:/w/fx/mc/obj-i686-pc-mingw32/toolkit/crashreporter/jsoncpp/src/lib_json/Unified_cpp_src_lib_json0.cpp:11: 1:35.06 c:/w/fx/mc/toolkit/crashreporter/jsoncpp/src/lib_json/json_value.cpp(210,3): error: cannot use 'throw' with exceptions disabled 1:35.06 throw RuntimeError(msg); 1:35.06 ^ 1:35.06 c:/w/fx/mc/toolkit/crashreporter/jsoncpp/src/lib_json/json_value.cpp(214,3): error: cannot use 'throw' with exceptions disabled 1:35.06 throw LogicError(msg); 1:35.06 ^ 1:35.06 2 errors generated. 1:35.07 1:35.08 In the directory /c/w/fx/mc/obj-i686-pc-mingw32/toolkit/crashreporter/jsoncpp/src/lib_json 1:35.08 The following command failed to execute properly: 1:35.09 c:/w/fx/mc/obj-i686-pc-mingw32/_virtualenv/Scripts/python.exe -m mozbuild.action.cl c:/w/tools/llvm/obj/bin/clang-cl.exe -FoUnified_cpp_src_lib_json0.obj -c -DNDEBUG=1 -DTRIMMED=1 -DNO_STABS_SUPPORT -Ic:/w/fx/mc/toolkit/crashreporter/jsoncpp/src/lib_json -Ic:/w/fx/mc/obj-i686-pc-mingw32/toolkit/crashreporter/jsoncpp/src/lib_json -Ic:/w/fx/mc/toolkit/crashreporter/jsoncpp/include -Ic:/w/fx/mc/toolkit/crashreporter/google-breakpad/src -Ic:/w/fx/mc/obj-i686-pc-mingw32/dist/include -Ic:/w/fx/mc/obj-i686-pc-mingw32/dist/include/nspr -Ic:/w/fx/mc/obj-i686-pc-mingw32/dist/include/nss -MD -FI c:/w/fx/mc/obj-i686-pc-mingw32/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -Qunused-arguments -TP -nologo -wd5026 -wd5027 -Zc:sizedDealloc- -Zc:threadSafeInit- -wd4091 -wd4577 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -arch:SSE2 -FS -Gw -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -Wno-inline-new-delete -Wno-invalid-offsetof -Wno-invalid-constexpr -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-unused-local-typedef -Wno-ignored-attributes -we4553 -GR- -Zi -O1 -Oi -Oy -fexceptions -wd4005 -Fdgenerated.pdb c:/w/fx/mc/obj-i686-pc-mingw32/toolkit/crashreporter/jsoncpp/src/lib_json/Unified_cpp_src_lib_json0.cpp 1:35.09 c:/w/fx/mc/config/rules.mk:934: recipe for target 'Unified_cpp_src_lib_json0.obj' failed 1:35.09 mozmake.EXE[5]: *** [Unified_cpp_src_lib_json0.obj] Error 1 1:35.09 c:/w/fx/mc/config/recurse.mk:71: recipe for target 'toolkit/crashreporter/jsoncpp/src/lib_json/target' failed 1:35.09 mozmake.EXE[4]: *** [toolkit/crashreporter/jsoncpp/src/lib_json/target] Error 2
OS: Unspecified → Windows
Version: unspecified → Trunk
It's weird that after I replace "-fexceptions" to "-Xclang -fcxx-exceptions", clang-cl still complains it's unknown arguments. However if I copy and run the compile command directly, it works fine.
Attached patch wip (obsolete) — Splinter Review
Comment on attachment 8803737 [details] [diff] [review] wip Review of attachment 8803737 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the change below if the patch fixes the build issues. ::: toolkit/crashreporter/jsoncpp/src/lib_json/moz.build @@ +17,5 @@ > # This code is only used in the stand-alone minidump analyzer executable so > # enabling exceptions should be fine. > +if CONFIG['CLANG_CL']: > + CXXFLAGS += [ > + '-Xclang -fcxx-exceptions', I think this should be: CXXFLAGS += [ '-Xclang', '-fcxx-exceptions', ] (indented appropriately, of course)
Attachment #8803737 - Flags: review+
Attached patch patch v1Splinter Review
That works, thank you.
Attachment #8803737 - Attachment is obsolete: true
Pushed by tchou@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4dc7863a13f9 Use updated option of "-fexceptions" for clang-cl. r=froydnj
Assignee: nobody → janus926
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: