cl.exe doesn't understand it; there's /Od instead. See also the review
thread for r229575.
Update lots of compiler-rt tests to use -Od instead of -O0.
Ran rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'
Paths
| Differential D64506
clang-cl: Remove -O0 option ClosedPublic Authored by thakis on Jul 10 2019, 9:12 AM.
Details Summary cl.exe doesn't understand it; there's /Od instead. See also the review Update lots of compiler-rt tests to use -Od instead of -O0.
Diff Detail
Event TimelineComment Actions I did check that we now warn, like you had requested: $ out/gn/bin/clang-cl test.cc /O0 /c clang: warning: argument unused during compilation: '/O0' [-Wunused-command-line-argument] Adding a test for that felt weird though, so I didn't. Comment Actions Does clang-cl -O0 without a / still work, though? It's used: $ git grep O0 ../compiler-rt/test/asan/TestCases/Windows/ Comment Actions
Oh thanks, I only ran clang tests, not compiler-rt tests. It no longer works, O isn't a CoreOption: $ out/gn/bin/clang-cl test.cc -O0 /c clang: warning: argument unused during compilation: '-O0' [-Wunused-command-line-argument] But these tests should just use /Od, right? This revision is now accepted and ready to land.Jul 10 2019, 5:19 PM Closed by commit rL365724: clang-cl: Remove -O0 option (authored by nico). · Explain WhyJul 10 2019, 6:19 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 209111 cfe/trunk/include/clang/Driver/CLCompatOptions.td
compiler-rt/trunk/test/asan/TestCases/Windows/aligned_mallocs.cc
compiler-rt/trunk/test/asan/TestCases/Windows/allocators_sanity.cc
compiler-rt/trunk/test/asan/TestCases/Windows/beginthreadex.cc
compiler-rt/trunk/test/asan/TestCases/Windows/bitfield.cc
compiler-rt/trunk/test/asan/TestCases/Windows/bitfield_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/calloc_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/calloc_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/calloc_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/coverage-dll-stdio.cc
compiler-rt/trunk/test/asan/TestCases/Windows/crt_initializers.cc
compiler-rt/trunk/test/asan/TestCases/Windows/demangled_names.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_aligned_mallocs.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_allocators_sanity.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_cerr.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_control_c.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_global_dead_strip.c
compiler-rt/trunk/test/asan/TestCases/Windows/dll_host.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memchr.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memcpy_indirect.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_memset.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_intercept_strlen.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_malloc_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_noreturn.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_null_deref.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_poison_unpoison.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_seh.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_stack_use_after_return.cc
compiler-rt/trunk/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/double_free.cc
compiler-rt/trunk/test/asan/TestCases/Windows/double_operator_delete.cc
compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string.cc
compiler-rt/trunk/test/asan/TestCases/Windows/global_const_string_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_doublefree.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_flags_fallback.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_huge.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_sanity.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heapalloc_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/heaprealloc.cc
compiler-rt/trunk/test/asan/TestCases/Windows/hello_world.cc
compiler-rt/trunk/test/asan/TestCases/Windows/intercept_memcpy.cc
compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strdup.cc
compiler-rt/trunk/test/asan/TestCases/Windows/intercept_strlen.cc
compiler-rt/trunk/test/asan/TestCases/Windows/interface_symbols_windows.cc
compiler-rt/trunk/test/asan/TestCases/Windows/iostream_sbo.cc
compiler-rt/trunk/test/asan/TestCases/Windows/malloc_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/malloc_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/malloc_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/null_deref_multiple_dlls.cc
compiler-rt/trunk/test/asan/TestCases/Windows/oom.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/operator_new_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/queue_user_work_item_report.cc
compiler-rt/trunk/test/asan/TestCases/Windows/realloc_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/realloc_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/realloc_uaf.cc
compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_reload_dll.cc
compiler-rt/trunk/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc
compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap.cc
compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_flags_fallback.cc
compiler-rt/trunk/test/asan/TestCases/Windows/rtlallocateheap_zero.cc
compiler-rt/trunk/test/asan/TestCases/Windows/shadow_mapping_failure.cc
compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/stack_array_sanity.cc
compiler-rt/trunk/test/asan/TestCases/Windows/stack_use_after_return.cc
compiler-rt/trunk/test/asan/TestCases/Windows/symbols_path.cc
compiler-rt/trunk/test/asan/TestCases/Windows/thread_simple.cc
compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc
compiler-rt/trunk/test/asan/TestCases/Windows/thread_stack_reuse.cc
compiler-rt/trunk/test/asan/TestCases/Windows/thread_stress.cc
compiler-rt/trunk/test/asan/TestCases/Windows/thread_suspended.cc
compiler-rt/trunk/test/asan/TestCases/Windows/use_after_realloc.cc
compiler-rt/trunk/test/asan/TestCases/Windows/user-exception.cc
compiler-rt/trunk/test/asan/TestCases/Windows/windows_h.cc
compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_heap.cc
compiler-rt/trunk/test/asan/TestCases/Windows/wrong_downcast_on_stack.cc
|