aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-08-13 09:04:46 -0700
committerTobias Bosch <tbosch@google.com>2019-08-13 18:42:04 +0000
commitcaf583bca202cd1c5b3ae75e03073cba105f5e6d (patch)
tree6c37e64f7fef117a1cd8103466ca445bab153a58 /compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json
parentb30a1ed8f990b24980ca5c6ceeaedfb806c48521 (diff)
downloadtoolchain-utils-caf583bca202cd1c5b3ae75e03073cba105f5e6d.tar.gz
Create a goldenfile for every section.
Previously, a golden file contained multiple names sections. This change splits these into separate files, making changes easier to compare. BUG=chromium:773875 TEST=unit test Change-Id: Icffec335601297f504f98c4ff1654238f7838080 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1752523 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json')
-rw-r--r--compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json259
1 files changed, 259 insertions, 0 deletions
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
new file mode 100644
index 00000000..a39f9082
--- /dev/null
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_sysroot_wrapper_common.json
@@ -0,0 +1,259 @@
+[
+ {
+ "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",
+ "-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",
+ "-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",
+ "-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",
+ "-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": "./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",
+ "-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"
+ ]
+ }
+ }
+ ]
+ }
+]