BTW could someone mention __asan_default_options in https://github.com/google/sanitizers/wiki/AddressSanitizerFlags ? Can't do this from my home email.
On Tue, Jan 12, 2016 at 8:01 PM, Yuri Gribov <[email protected]> wrote: > On Tue, Jan 12, 2016 at 7:57 PM, <[email protected]> wrote: >> >> >> On Monday, January 11, 2016 at 1:51:58 PM UTC-5, Reid Kleckner wrote: >>> >>> Which command line are you referring to, the compiler command line or the >>> application command line? >> >> >> When we invoke the compiler, we want to ensure the option is in effect. For >> example: >> >> clang++ -fsanitze=address -fcheck_initialization_order=true -c foo.cxx >> >>> >>> If you want to bake in some options at compile time, there are a few ways >>> to do it. -DASAN_DEFAULT_OPTIONS=check_initialization_order=true will work, >>> or you can define the __asan_default_options function somewhere in the >>> binary like this: >>> >> >> Thanks, we are not compiling the compiler. > > You don't need to - just define this function somewhere in your exe > and libasan will automatically find it and take it's return value as > default option string. To control the string from cmdline you'll just > need to return a cmdline-controlled macro from it. > >> >> Jeff >> >> -- >> You received this message because you are subscribed to the Google Groups >> "address-sanitizer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
