Lines Matching refs:flags
510 func toDisableImplicitIntegerChange(flags []string) bool {
513 for _, f := range flags {
518 for _, f := range flags {
526 func toDisableUnsignedShiftBaseChange(flags []string) bool {
529 for _, f := range flags {
534 for _, f := range flags {
542 func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags { func
549 flags.Local.LdFlags = append(flags.Local.LdFlags,
555 flags.libFlags = append([]string{builtinsRuntimePath}, flags.libFlags...)
559 return flags
566 flags.RequiredInstructionSet = "arm"
568 flags.Local.CFlags = append(flags.Local.CFlags, asanCflags...)
569 flags.Local.LdFlags = append(flags.Local.LdFlags, asanLdflags...)
572 flags.Local.CFlags = append(flags.Local.CFlags, "-mllvm", "-asan-instrument-reads=0")
578 flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--no-as-needed")
580 flags.Local.CFlags = append(flags.Local.CFlags, "-mllvm", "-asan-globals=0")
582 flags.DynamicLinker = "/system/bin/bootstrap/linker_asan"
584 flags.DynamicLinker = "/system/bin/linker_asan"
586 if flags.Toolchain.Is64Bit() {
587 flags.DynamicLinker += "64"
593 flags.Local.CFlags = append(flags.Local.CFlags, hwasanCflags...)
595 flags.Local.CFlags = append(flags.Local.CFlags, "-mllvm", "-hwasan-instrument-reads=0")
600 flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize=fuzzer-no-link")
603 _, flags.Local.LdFlags = removeFromList("-flto", flags.Local.LdFlags)
604 _, flags.Local.CFlags = removeFromList("-flto", flags.Local.CFlags)
605 flags.Local.LdFlags = append(flags.Local.LdFlags, "-fno-lto")
606 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-lto")
611 flags.Local.LdFlags = append(flags.Local.LdFlags, "-fno-sanitize-coverage=stack-depth")
612 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-coverage=stack-depth")
615 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-experimental-new-pass-manager")
619 flags.Local.CFlags = append(flags.Local.CFlags, "-U_FORTIFY_SOURCE")
628 flags.Local.LdFlags = append(flags.Local.LdFlags, `-Wl,-rpath,\$$ORIGIN`)
635 flags.RequiredInstructionSet = "thumb"
638 flags.Local.CFlags = append(flags.Local.CFlags, cfiCflags...)
639 flags.Local.AsFlags = append(flags.Local.AsFlags, cfiAsflags...)
641 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-cfi-canonical-jump-tables")
645 if !inList("-fvisibility=hidden", flags.Local.CFlags) {
646 flags.Local.CFlags = append(flags.Local.CFlags, "-fvisibility=default")
648 flags.Local.LdFlags = append(flags.Local.LdFlags, cfiLdflags...)
651 _, flags.Local.CFlags = removeFromList("-fsanitize-cfi-cross-dso", flags.Local.CFlags)
652 _, flags.Local.LdFlags = removeFromList("-fsanitize-cfi-cross-dso", flags.Local.LdFlags)
657 flags.Local.CFlags = append(flags.Local.CFlags, intOverflowCflags...)
663 flags.Local.CFlags = append(flags.Local.CFlags, sanitizeArg)
664 flags.Local.AsFlags = append(flags.Local.AsFlags, sanitizeArg)
668 _, flags.Global.LdFlags = removeFromList("-Wl,--no-undefined", flags.Global.LdFlags)
669 flags.Local.LdFlags = append(flags.Local.LdFlags, sanitizeArg)
673 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize=vptr,function")
678 flags.Local.CFlags = append(flags.Local.CFlags, strings.Join(minimalRuntimeFlags, " "))
679 flags.libFlags = append([]string{minimalRuntimePath}, flags.libFlags...)
680 flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--exclude-libs,"+minimalRuntimeLib)
682 flags.libFlags = append([]string{builtinsRuntimePath}, flags.libFlags...)
688 …flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-trap=all", "-fno-sanitize-recover=a…
690 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-recover=all")
692 flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-trap=all", "-ftrap-function=abort")
695 if toDisableImplicitIntegerChange(flags.Local.CFlags) {
696 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize=implicit-integer-sign-change")
699 if toDisableUnsignedShiftBaseChange(flags.Local.CFlags) {
700 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize=unsigned-shift-base")
705 …flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-trap="+strings.Join(sanitize.Proper…
710 flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-recover="+
715 flags.Local.CFlags = append(flags.Local.CFlags, "-fno-sanitize-recover="+
721 flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-blacklist="+blocklist.String())
722 flags.CFlagsDeps = append(flags.CFlagsDeps, blocklist.Path())
725 return flags