diff options
Diffstat (limited to 'compiler_wrapper/testdata/cros_hardened_golden')
15 files changed, 0 insertions, 4756 deletions
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json b/compiler_wrapper/testdata/cros_hardened_golden/bisect.json deleted file mode 100644 index f9a503f3..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/bisect.json +++ /dev/null @@ -1,178 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "env": [ - "BISECT_STAGE=someBisectStage", - "HOME=/user/home" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/env", - "args": [ - "python", - "-c", - "\nimport bisect_driver\nimport shlex\nimport sys\n\ndef ExpandArgs(args, target):\n\tfor arg in args:\n\t\tif arg[0] == '@':\n\t\t\twith open(arg[1:], 'rb') as f:\n\t\t\t\tExpandArgs(shlex.split(f.read()), target)\n\t\telse:\n\t\t\ttarget.append(arg)\n\treturn target\n\nstage = sys.argv[1]\ndir = sys.argv[2]\nexecargs = ExpandArgs(sys.argv[3:], [])\n\nsys.exit(bisect_driver.bisect_driver(stage, dir, execargs))\n", - "someBisectStage", - "/tmp/sysroot_bisect", - "/usr/bin/ccache", - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "BISECT_STAGE=someBisectStage", - "BISECT_DIR=someBisectDir", - "HOME=/user/home" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/env", - "args": [ - "python", - "-c", - "\nimport bisect_driver\nimport shlex\nimport sys\n\ndef ExpandArgs(args, target):\n\tfor arg in args:\n\t\tif arg[0] == '@':\n\t\t\twith open(arg[1:], 'rb') as f:\n\t\t\t\tExpandArgs(shlex.split(f.read()), target)\n\t\telse:\n\t\t\ttarget.append(arg)\n\treturn target\n\nstage = sys.argv[1]\ndir = sys.argv[2]\nexecargs = ExpandArgs(sys.argv[3:], [])\n\nsys.exit(bisect_driver.bisect_driver(stage, dir, execargs))\n", - "someBisectStage", - "someBisectDir", - "/usr/bin/ccache", - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "BISECT_STAGE=someBisectStage", - "BISECT_DIR=someBisectDir", - "HOME=/user/home" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/env", - "args": [ - "python", - "-c", - "\nimport bisect_driver\nimport shlex\nimport sys\n\ndef ExpandArgs(args, target):\n\tfor arg in args:\n\t\tif arg[0] == '@':\n\t\t\twith open(arg[1:], 'rb') as f:\n\t\t\t\tExpandArgs(shlex.split(f.read()), target)\n\t\telse:\n\t\t\ttarget.append(arg)\n\treturn target\n\nstage = sys.argv[1]\ndir = sys.argv[2]\nexecargs = ExpandArgs(sys.argv[3:], [])\n\nsys.exit(bisect_driver.bisect_driver(stage, dir, execargs))\n", - "someBisectStage", - "someBisectDir", - "/usr/bin/ccache", - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json deleted file mode 100644 index 847d0e5f..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json +++ /dev/null @@ -1,434 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-eabi-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-eabi", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-eabi" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-win-gnu-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-win-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-win-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-linux-gnu-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7m-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "armv7m-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-eabi-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7m-cros-eabi", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "armv7m-cros-eabi" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-win-gnu-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7m-cros-win-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "armv7m-cros-win-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-linux-gnu-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv8m-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "armv8m-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-eabi-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv8m-cros-eabi", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "armv8m-cros-eabi" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-win-gnu-clang", - "args": [ - "-ftrapv", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv8m-cros-win-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "-ftrapv", - "main.cc", - "-B../../bin", - "-target", - "armv8m-cros-win-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json deleted file mode 100644 index 15241001..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json +++ /dev/null @@ -1,416 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-eabi-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-eabi", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-eabi" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-win-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-win-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-win-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7m-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc", - "-B../../bin", - "-target", - "armv7m-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-eabi-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7m-cros-eabi", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "armv7m-cros-eabi" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-win-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7m-cros-win-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc", - "-B../../bin", - "-target", - "armv7m-cros-win-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv8m-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc", - "-B../../bin", - "-target", - "armv8m-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-eabi-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv8m-cros-eabi", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "armv8m-cros-eabi" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-win-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv8m-cros-win-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc", - "-B../../bin", - "-target", - "armv8m-cros-win-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json deleted file mode 100644 index 86cead04..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_path.json +++ /dev/null @@ -1,605 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang++", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang++", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "CLANG=somepath/clang" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "somepath/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Xclang-path=/somedir", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "/somedir/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-resource-dir=someResourceDir", - "--gcc-toolchain=/usr", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Xclang-path=/somedir", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "/somedir/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-resource-dir=someResourceDir", - "--gcc-toolchain=/usr", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Xclang-path=/somedir", - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "/somedir/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-resource-dir=someResourceDir", - "--gcc-toolchain=/usr", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "/tmp/stable/x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "/usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./a/b/c/d/e/f/g/x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "a/b/usr/bin/clang", - "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-Ba/b/bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./symlinked/x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "a/b/usr/bin/clang", - "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-Ba/b/bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "somedir/x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "PATH=/tmp/stable/pathenv" - ], - "wrapper": { - "cmd": { - "path": "x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "/usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json deleted file mode 100644 index 39094948..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sanitizer_args.json +++ /dev/null @@ -1,387 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=kernel-address", - "-Wl,--no-undefined", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=kernel-address", - "-Wl,-z,defs", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=kernel-address", - "-D_FORTIFY_SOURCE=1", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=kernel-address", - "-D_FORTIFY_SOURCE=2", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=fuzzer", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fno-experimental-new-pass-manager", - "-fsanitize=fuzzer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=address", - "-fprofile-instr-generate", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fno-experimental-new-pass-manager", - "-fsanitize=address", - "-fprofile-instr-generate", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fsanitize=address", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-fno-omit-frame-pointer", - "-fsanitize=address", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-fprofile-instr-generate", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fprofile-instr-generate", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json deleted file mode 100644 index c9ad6e46..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_specific_args.json +++ /dev/null @@ -1,347 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-mno-movbe", - "-pass-exit-codes", - "-Wclobbered", - "-Wno-psabi", - "-Wlogical-op", - "-Wmissing-parameter-type", - "-Wold-style-declaration", - "-Woverride-init", - "-Wunsafe-loop-optimizations", - "-Wstrict-aliasing=abc", - "-finline-limit=abc", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Wno-error=cpp", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-Wno-#warnings", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Wno-error=maybe-uninitialized", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-Wno-error=uninitialized", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Wno-error=unused-but-set-variable", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-Wno-error=unused-variable", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Wno-unused-but-set-variable", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-Wno-unused-variable", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Wunused-but-set-variable", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-Wunused-variable", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-Xclang-only=-someflag", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-someflag", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json deleted file mode 100644 index ff68d4bd..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json +++ /dev/null @@ -1,310 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-noccache", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc.real", - "args": [ - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "GOMACC_PATH=someNonExistingPath" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-nopie", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "-D__KERNEL__", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fno-stack-protector", - "-D__KERNEL__", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7a-cros-linux-gnueabihf-clang", - "args": [ - "-D__KERNEL__", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/armv7a-cros-linux-gnueabihf", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "-fno-stack-protector", - "-D__KERNEL__", - "main.cc", - "-B../../bin", - "-target", - "armv7a-cros-linux-gnueabihf" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7a-cros-linux-gnueabihf", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "--sysroot=xyz", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "../../usr/bin/clang", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "--sysroot=xyz", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json deleted file mode 100644 index 03d0c437..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json +++ /dev/null @@ -1,343 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "env": [ - "WITH_TIDY=1" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "../../usr/bin/clang-tidy", - "args": [ - "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", - "main.cc", - "--", - "-resource-dir=someResourceDir", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - }, - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "WITH_TIDY=1", - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "../../usr/bin/clang-tidy", - "args": [ - "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", - "main.cc", - "--", - "-resource-dir=someResourceDir", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - }, - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "WITH_TIDY=1", - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerrorclang-tidy failed" - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "../../usr/bin/clang-tidy", - "args": [ - "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", - "main.cc", - "--", - "-resource-dir=someResourceDir", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "WITH_TIDY=1", - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--print-resource-dir" - ] - }, - "stdout": "someResourceDir" - }, - { - "cmd": { - "path": "../../usr/bin/clang-tidy", - "args": [ - "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", - "main.cc", - "--", - "-resource-dir=someResourceDir", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - } - }, - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json b/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json deleted file mode 100644 index f80d9b65..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/force_disable_werror.json +++ /dev/null @@ -1,226 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "env": [ - "FORCE_DISABLE_WERROR=1" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "FORCE_DISABLE_WERROR=1" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - }, - "stderr": "-Werror originalerror", - "exitcode": 1 - }, - { - "cmd": { - "path": "ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu", - "-Wno-error" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "FORCE_DISABLE_WERROR=1" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-clang", - "args": [ - "main.cc" - ] - }, - "stderr": "-Werror originalerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - }, - "stderr": "-Werror originalerror", - "exitcode": 1 - }, - { - "cmd": { - "path": "ccache", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu", - "-Wno-error" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002", - "CCACHE_CPP2=yes" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json deleted file mode 100644 index b9778247..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_clang_syntax.json +++ /dev/null @@ -1,253 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-clang-syntax", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu", - "-fsyntax-only", - "-stdlib=libstdc++" - ] - } - }, - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-clang-syntax", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "../../usr/bin/clang", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu", - "-fsyntax-only", - "-stdlib=libstdc++" - ] - } - }, - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-clang-syntax", - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu", - "-fsyntax-only", - "-stdlib=libstdc++" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-clang-syntax", - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "../../usr/bin/clang", - "args": [ - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-Qunused-arguments", - "-grecord-gcc-switches", - "-fno-addrsig", - "-Wno-tautological-constant-compare", - "-Wno-tautological-unsigned-enum-zero-compare", - "-Wno-unknown-warning-option", - "-Wno-section", - "-static-libgcc", - "-fuse-ld=lld", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-B../../bin", - "-target", - "x86_64-cros-linux-gnu", - "-fsyntax-only", - "-stdlib=libstdc++" - ] - } - }, - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json deleted file mode 100644 index a037dd10..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json +++ /dev/null @@ -1,329 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-eabi-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-eabi-gcc.real", - "--sysroot=/usr/x86_64-cros-eabi", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-win-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-win-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-win-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv7m-cros-linux-gnu-gcc.real", - "--sysroot=/usr/armv7m-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-eabi-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv7m-cros-eabi-gcc.real", - "--sysroot=/usr/armv7m-cros-eabi", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7m-cros-win-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv7m-cros-win-gnu-gcc.real", - "--sysroot=/usr/armv7m-cros-win-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7m-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv8m-cros-linux-gnu-gcc.real", - "--sysroot=/usr/armv8m-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-eabi-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv8m-cros-eabi-gcc.real", - "--sysroot=/usr/armv8m-cros-eabi", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-eabi", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv8m-cros-win-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv8m-cros-win-gnu-gcc.real", - "--sysroot=/usr/armv8m-cros-win-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv8m-cros-win-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json deleted file mode 100644 index 24ad65ae..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_path.json +++ /dev/null @@ -1,233 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - }, - "stdout": "somemessage", - "stderr": "someerror", - "exitcode": 1 - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "/tmp/stable/x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "/tmp/stable/x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./symlinked/x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./symlinked/x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "PATH=/tmp/stable/pathenv" - ], - "wrapper": { - "cmd": { - "path": "x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "/tmp/stable/pathenv/x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json deleted file mode 100644 index a63aa25c..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sanitizer_args.json +++ /dev/null @@ -1,320 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=kernel-address", - "-Wl,--no-undefined", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=kernel-address", - "-Wl,-z,defs", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=kernel-address", - "-D_FORTIFY_SOURCE=1", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=kernel-address", - "-D_FORTIFY_SOURCE=2", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=kernel-address", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=fuzzer", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=fuzzer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=address", - "-fprofile-instr-generate", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=address", - "-fprofile-instr-generate", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fsanitize=address", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fsanitize=address", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-fprofile-instr-generate", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fprofile-instr-generate", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json deleted file mode 100644 index b7a56ce4..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_specific_args.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-march=goldmont", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-march=silvermont", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-march=goldmont-plus", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-march=silvermont", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-march=skylake", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-march=corei7", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - } -] diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json deleted file mode 100644 index c52003b7..00000000 --- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_sysroot_wrapper_common.json +++ /dev/null @@ -1,256 +0,0 @@ -[ - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-noccache", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc.real", - "args": [ - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "GOMACC_PATH=someNonExistingPath" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "env": [ - "GOMACC_PATH=/tmp/stable/gomacc" - ], - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/tmp/stable/gomacc", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-nopie", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "-D__KERNEL__", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "--sysroot=/usr/x86_64-cros-linux-gnu", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "-fno-stack-protector", - "-D__KERNEL__", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./armv7a-cros-linux-gnueabihf-gcc", - "args": [ - "-D__KERNEL__", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./armv7a-cros-linux-gnueabihf-gcc.real", - "--sysroot=/usr/armv7a-cros-linux-gnueabihf", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-D_FORTIFY_SOURCE=2", - "-mthumb", - "-fno-stack-protector", - "-D__KERNEL__", - "main.cc" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/armv7a-cros-linux-gnueabihf", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - }, - { - "wd": "/tmp/stable", - "wrapper": { - "cmd": { - "path": "./x86_64-cros-linux-gnu-gcc", - "args": [ - "--sysroot=xyz", - "main.cc" - ] - } - }, - "cmds": [ - { - "cmd": { - "path": "/usr/bin/ccache", - "args": [ - "./x86_64-cros-linux-gnu-gcc.real", - "-fno-reorder-blocks-and-partition", - "-Wno-unused-local-typedefs", - "-Wno-maybe-uninitialized", - "-fstack-protector-strong", - "-fPIE", - "-pie", - "-D_FORTIFY_SOURCE=2", - "-fno-omit-frame-pointer", - "--sysroot=xyz", - "main.cc", - "-mno-movbe" - ], - "env_updates": [ - "CCACHE_BASEDIR=/usr/x86_64-cros-linux-gnu", - "CCACHE_DIR=/var/cache/distfiles/ccache", - "CCACHE_UMASK=002" - ] - } - } - ] - } -] |