HomePhabricator

[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline.

Authored by plotfi on Nov 16 2019, 8:41 AM.

Description

[clang][IFS] Driver pipeline: generate interface stubs after standard pipeline.

Up until now, clang interface stubs has replaced the standard
PP -> C -> BE -> ASM -> LNK pipeline. With this change, it will happen in
conjunction with it. So what when you build your code you will get an
a.out or lib.so as well as an interface stub file.

Example:

clang -shared -o libfoo.so -emit-interface-stubs ...

will generate both a libfoo.so and a libfoo.ifso. The .so file will
contain the code from the standard compilation pipeline and the .ifso
file will contain the ELF stub library.

Differential Revision: https://reviews.llvm.org/D70274

Event Timeline

anil9 added a subscriber: anil9.EditedNov 19 2019, 12:09 AM

This changeset is breaking the buildbot clang-ppc64le-linux (http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/28006/steps/ninja%20check%201/logs/stdio)

Errors

TEST 'Clang :: InterfaceStubs/driver-test2.c' FAILED

Script

RUN: at line 3'; /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target x86_64-unknown-linux-gnu -c -emit-interface-stubs /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test2.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/object.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/weak.cpp
'RUN: at line 5'; /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -emit-interface-stubs -emit-merged-ifs driver-test2.o object.o weak.o -S -o - | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test2.c

Exit Code: 2

TEST 'Clang :: InterfaceStubs/driver-test.c' FAILED

Script

'RUN: at line 3'; /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target x86_64-unknown-linux-gnu -x c -o /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/InterfaceStubs/Output/driver-test.c.tmp1 -emit-interface-stubs /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/object.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/weak.cpp
: 'RUN: at line 4'; llvm-nm /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/InterfaceStubs/Output/driver-test.c.tmp1 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test.c
: 'RUN: at line 5'; llvm-nm /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/InterfaceStubs/Output/driver-test.c.tmp1.ifso 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test.c

Exit Code: 1

Thanks,
Anil

It's already been reverted.

This changeset is breaking the buildbot clang-ppc64le-linux (http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/28006/steps/ninja%20check%201/logs/stdio)

Errors

  • TEST 'Clang :: InterfaceStubs/driver-test2.c' FAILED **** Script -- 'RUN: at line 3'; /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target x86_64-unknown-linux-gnu -c -emit-interface-stubs /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test2.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/object.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/weak.cpp 'RUN: at line 5'; /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -emit-interface-stubs -emit-merged-ifs driver-test2.o object.o weak.o -S -o - | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test2.c -- Exit Code: 2
  • TEST 'Clang :: InterfaceStubs/driver-test.c' FAILED **** Script: -- : 'RUN: at line 3'; /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/clang -target x86_64-unknown-linux-gnu -x c -o /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/InterfaceStubs/Output/driver-test.c.tmp1 -emit-interface-stubs /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/object.c /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/weak.cpp : 'RUN: at line 4'; llvm-nm /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/InterfaceStubs/Output/driver-test.c.tmp1 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test.c : 'RUN: at line 5'; llvm-nm /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/tools/clang/test/InterfaceStubs/Output/driver-test.c.tmp1.ifso 2>&1 | /home/buildbots/ppc64le-clang-test/clang-ppc64le/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-test/clang-ppc64le/llvm/clang/test/InterfaceStubs/driver-test.c -- Exit Code: 1

Thanks,
Anil