diff options
author | Tobias Bosch <tbosch@google.com> | 2019-08-15 17:17:57 -0700 |
---|---|---|
committer | Tobias Bosch <tbosch@google.com> | 2019-08-16 14:49:15 +0000 |
commit | 5f98f2d395c2888a6b659c7bf6b0ae732baacbfc (patch) | |
tree | c904c3d84e241f93cd1fba7c07b05613466d400a /compiler_wrapper/testdata/cros_hardened_noccache_golden | |
parent | 47f580fe94bc41a39c010559c78d918d6fabc2db (diff) | |
download | toolchain-utils-5f98f2d395c2888a6b659c7bf6b0ae732baacbfc.tar.gz |
Resolve wrapper path against path env
BUG=chromium:773875
TEST=unit test
Change-Id: I150eb18a5d765d43ee7a2341767ff41f6641c6ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1757222
Tested-by: Tobias Bosch <tbosch@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/testdata/cros_hardened_noccache_golden')
-rw-r--r-- | compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json | 46 | ||||
-rw-r--r-- | compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json | 42 |
2 files changed, 82 insertions, 6 deletions
diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json index ce07459e..a00bcc82 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/clang_path.json @@ -362,7 +362,7 @@ "wd": "/tmp/stable", "wrapper": { "cmd": { - "path": "a/b/c/d/e/f/g/x86_64-cros-linux-gnu-clang", + "path": "./a/b/c/d/e/f/g/x86_64-cros-linux-gnu-clang", "args": [ "main.cc" ] @@ -400,7 +400,7 @@ "wd": "/tmp/stable", "wrapper": { "cmd": { - "path": "symlinked/x86_64-cros-linux-gnu-clang", + "path": "./symlinked/x86_64-cros-linux-gnu-clang", "args": [ "main.cc" ] @@ -433,5 +433,47 @@ } } ] + }, + { + "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/clang", + "args": [ + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-implicit-int-float-conversion", + "-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" + ] + } + } + ] } ] diff --git a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json index 66957f5b..694b921a 100644 --- a/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json +++ b/compiler_wrapper/testdata/cros_hardened_noccache_golden/gcc_path.json @@ -102,7 +102,7 @@ "wd": "/tmp/stable", "wrapper": { "cmd": { - "path": "a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc", + "path": "./a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc", "args": [ "main.cc" ] @@ -111,7 +111,7 @@ "cmds": [ { "cmd": { - "path": "a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc.real", + "path": "./a/b/c/d/e/f/g/x86_64-cros-linux-gnu-gcc.real", "args": [ "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", "-fno-reorder-blocks-and-partition", @@ -133,7 +133,7 @@ "wd": "/tmp/stable", "wrapper": { "cmd": { - "path": "symlinked/x86_64-cros-linux-gnu-gcc", + "path": "./symlinked/x86_64-cros-linux-gnu-gcc", "args": [ "main.cc" ] @@ -142,7 +142,7 @@ "cmds": [ { "cmd": { - "path": "symlinked/x86_64-cros-linux-gnu-gcc.real", + "path": "./symlinked/x86_64-cros-linux-gnu-gcc.real", "args": [ "--sysroot=/tmp/stable/a/b/usr/x86_64-cros-linux-gnu", "-fno-reorder-blocks-and-partition", @@ -159,5 +159,39 @@ } } ] + }, + { + "wd": "/tmp/stable", + "env": [ + "PATH=/tmp/stable/pathenv" + ], + "wrapper": { + "cmd": { + "path": "x86_64-cros-linux-gnu-gcc", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "/tmp/stable/pathenv/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" + ] + } + } + ] } ] |