From 5a8a4030a272c8155ec18cf7faa16d37d718f076 Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Tue, 14 Mar 2023 02:19:17 +0000 Subject: [PATCH] [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 --- .buckconfig.oss | 1 + .github/workflows/_buck-build-test.yml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.buckconfig.oss b/.buckconfig.oss index 6a214726272fd6..b4012a1e10ad27 100644 --- a/.buckconfig.oss +++ b/.buckconfig.oss @@ -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 diff --git a/.github/workflows/_buck-build-test.yml b/.github/workflows/_buck-build-test.yml index 0f571302b1f0c1..12860bbd1c868e 100644 --- a/.github/workflows/_buck-build-test.yml +++ b/.github/workflows/_buck-build-test.yml @@ -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