Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake][Fuchsia] armv8m -> armv8m.main #98695

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

PiJoules
Copy link
Contributor

armv8m builtins aren't being built because armv8m doesn't match any of the arm cpu strings in compiler-rt cmake files. Instead there's armv8m.main and armv8m.base. We want to use the armv8m.main version.

armv8m builtins aren't being built because `armv8m` doesn't match any of
the arm cpu strings in compiler-rt cmake files. Instead there's
`armv8m.main` and `armv8m.base`. We want to use the `armv8m.main`
version.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jul 12, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jul 12, 2024

@llvm/pr-subscribers-clang

Author: None (PiJoules)

Changes

armv8m builtins aren't being built because armv8m doesn't match any of the arm cpu strings in compiler-rt cmake files. Instead there's armv8m.main and armv8m.base. We want to use the armv8m.main version.


Full diff: https://github.com/llvm/llvm-project/pull/98695.diff

1 Files Affected:

  • (modified) clang/cmake/caches/Fuchsia-stage2.cmake (+6-2)
diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 9892b5d58e719..b8c9db49863c6 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -300,14 +300,18 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
-foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m-unknown-eabi)
+foreach(target armv6m-unknown-eabi;armv7m-unknown-eabi;armv8m.main-unknown-eabi)
   list(APPEND BUILTIN_TARGETS "${target}")
   set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
   set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
   set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
   set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
   foreach(lang C;CXX;ASM)
-    set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} -mthumb" CACHE STRING "")
+    set(BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb")
+    if(${target} STREQUAL "armv8m.main-unknown-eabi")
+      set(BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target}_CMAKE_${lang}_local_flags} -mfloat-abi=hard -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
+    endif()
+    set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "${BUILTINS_${target}_CMAKE_${lang}_local_flags}" CACHE STRING "")
   endforeach()
   foreach(type SHARED;MODULE;EXE)
     set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE STRING "")

@PiJoules PiJoules merged commit 2ad7b4a into llvm:main Jul 12, 2024
6 of 8 checks passed
@PiJoules PiJoules deleted the update-armv8m-triple branch July 12, 2024 20:55
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 12, 2024

LLVM Buildbot has detected a new failure on builder lldb-aarch64-ubuntu running on linaro-lldb-aarch64-ubuntu while building clang at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/1495

Here is the relevant piece of the build log for the reference:

Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: test_utils/TestInlineTest.py (1096 of 1992)
PASS: lldb-api :: terminal/TestSTTYBeforeAndAfter.py (1097 of 1992)
PASS: lldb-api :: test_utils/TestPExpectTest.py (1098 of 1992)
PASS: lldb-api :: test_utils/base/TestBaseTest.py (1099 of 1992)
PASS: lldb-api :: symbol_ondemand/shared_library/TestSharedLibOnDemand.py (1100 of 1992)
UNSUPPORTED: lldb-api :: tools/lldb-dap/breakpoint-events/TestDAP_breakpointEvents.py (1101 of 1992)
PASS: lldb-api :: source-manager/TestSourceManager.py (1102 of 1992)
PASS: lldb-api :: python_api/watchpoint/watchlocation/TestSetWatchlocation.py (1103 of 1992)
PASS: lldb-api :: tools/lldb-dap/breakpoint/TestDAP_logpoints.py (1104 of 1992)
PASS: lldb-api :: tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py (1105 of 1992)
FAIL: lldb-api :: tools/lldb-dap/attach/TestDAP_attachByPortNum.py (1106 of 1992)
******************** TEST 'lldb-api :: tools/lldb-dap/attach/TestDAP_attachByPortNum.py' FAILED ********************
Script:
--
/usr/bin/python3.8 /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/local/bin/llvm-ar --env OBJCOPY=/usr/bin/llvm-objcopy --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --arch aarch64 --build-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin/dsymutil --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-aarch64-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/attach -p TestDAP_attachByPortNum.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 19.0.0git (https://github.com/llvm/llvm-project.git revision 2ad7b4af95bc333d8f216915cd1b9d688590dcc5)
  clang revision 2ad7b4af95bc333d8f216915cd1b9d688590dcc5
  llvm revision 2ad7b4af95bc333d8f216915cd1b9d688590dcc5
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']
========= DEBUG ADAPTER PROTOCOL LOGS =========
1720819568.750083447 --> 
Content-Length: 343

{
  "arguments": {
    "adapterID": "lldb-native",
    "clientID": "vscode",
    "columnsStartAt1": true,
    "linesStartAt1": true,
    "locale": "en-us",
    "pathFormat": "path",
    "sourceInitFile": true,
    "supportsRunInTerminalRequest": true,
    "supportsStartDebuggingRequest": true,
    "supportsVariablePaging": true,
    "supportsVariableType": true
  },
  "command": "initialize",
  "seq": 1,
  "type": "request"
}
1720819568.752344370 <-- 
Content-Length: 1227


aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
armv8m builtins aren't being built because `armv8m` doesn't match any of
the arm cpu strings in compiler-rt cmake files. Instead there's
`armv8m.main` and `armv8m.base`. We want to use the `armv8m.main`
version.
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 16, 2024
armv8m builtins aren't being built because `armv8m` doesn't match any of
the arm cpu strings in compiler-rt cmake files. Instead there's
`armv8m.main` and `armv8m.base`. We want to use the `armv8m.main`
version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants