[BE] Add regression test for aten shared build (#96697)

To expose errors similar to https://github.com/pytorch/pytorch/pull/94401#issuecomment-1466654593 in OSS CI

Building `aten_cpu` as a shared library with `-Wl,--no-undefined` simulates behavior of Android NDK toolchain.

Test plan: It should fail, see https://github.com/pytorch/pytorch/actions/runs/4410571970/jobs/7728232916#step:14:1386

Pull Request resolved: https://github.com/pytorch/pytorch/pull/96697
Approved by: https://github.com/kit1980
This commit is contained in:
Nikita Shulga
2023-03-14 02:19:17 +00:00
committed by PyTorch MergeBot
parent a22b92d8ba
commit 5a8a4030a2
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,7 @@
[cxx]
cxxflags = -std=c++17
ldflags = -Wl,--no-undefined
should_remap_host_platform = true
cpp = /usr/bin/clang
cc = /usr/bin/clang

View File

@ -73,7 +73,7 @@ jobs:
timeout_minutes: 10
max_attempts: 5
command: |
sh scripts/buck_setup.sh
bash scripts/buck_setup.sh
- name: Build tools
run: |
@ -122,3 +122,7 @@ jobs:
- name: Build everything
run: |
buck build //... --keep-going
- name: Build aten_cpu@shared
run: |
buck build :aten_cpu#linux-x86_64,shared