)]}'
{
  "commit": "dc41571cd8af5a4de87412c64666899ec3f2b971",
  "tree": "f213aaeb20362ed92be9e7684272435b617e4bea",
  "parents": [
    "420a5de1a4abd7285b9f2f1a913914f2198f0a85"
  ],
  "author": {
    "name": "David Spickett",
    "email": "david.spickett@linaro.org",
    "time": "Wed Aug 13 09:47:43 2025 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Aug 13 09:47:43 2025 +0100"
  },
  "message": "[llvm][docs] Update CMake commands for cross compiling Arm builtins (#151544)\n\nThis does a few things:\n* LLVM_CONFIG_PATH is deprecated, use LLVM_CMAKE_DIR instead.\n* Don\u0027t use $ before command examples. I would normally, but the key\ncmake commands didn\u0027t use it so I removed it from all commands.\n* Makes the commands shown full commands, so you don\u0027t have to piece\nthem together.\n* Uses shell variables to cut down on repetition and make this easier to\nport to other targets.\n* Adds a few options to disable more compiler-rt things.\n* Use the built in cmake options for sysroot and toolchains.\n* Include test options in the first cmake command, so you don\u0027t have to\nre-do the whole thing after you read the testing section.\n* Removes the section about using BaremetalARM.cmake.\n\nThe closest I got to getting that cache to work was:\n```\nSYSROOT\u003d/home/david.spickett/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/arm-none-eabi/libc\nLLVM_TOOLCHAIN\u003d/home/david.spickett/LLVM-20.1.8-Linux-X64/\n\ncmake \\\n  -G Ninja \\\n  -DCMAKE_C_COMPILER\u003d${LLVM_TOOLCHAIN}/bin/clang \\\n  -DBAREMETAL_ARMV6M_SYSROOT\u003d${SYSROOT} \\\n  -DBAREMETAL_ARMV7M_SYSROOT\u003d${SYSROOT} \\\n  -DBAREMETAL_ARMV7EM_SYSROOT\u003d${SYSROOT} \\\n  -DCMAKE_BUILD_TYPE\u003dRelease \\\n  -DLLVM_ENABLE_RUNTIMES\u003d\"compiler-rt\" \\\n  -C ../llvm-project/clang/cmake/caches/BaremetalARM.cmake \\\n  -DCOMPILER_RT_BUILD_BUILTINS\u003dON \\\n  -DCOMPILER_RT_BUILD_LIBFUZZER\u003dOFF \\\n  -DCOMPILER_RT_BUILD_MEMPROF\u003dOFF \\\n  -DCOMPILER_RT_BUILD_PROFILE\u003dOFF \\\n  -DCOMPILER_RT_BUILD_CTX_PROFILE\u003dOFF \\\n  -DCOMPILER_RT_BUILD_SANITIZERS\u003dOFF \\\n  -DCOMPILER_RT_BUILD_XRAY\u003dOFF \\\n  -DCOMPILER_RT_BUILD_ORC\u003dOFF \\\n  -DCOMPILER_RT_BUILD_CRT\u003dOFF \\\n  ../llvm-project/runtimes\n```\nAll this does is build the x86 builtins. I tried forcing the issue with:\n```\n  -DBUILTIN_SUPPORTED_ARCH\u003d\"armv7m;armv6m;armv7em\" \\\n```\nBut again, just x86.\n\nIt\u0027s probably something deep in compiler-rt failing a compiler check for\nthe Arm targets. Even if that\u0027s the case, fixing that means adding more\noptions to the cmake command.\n\nI can\u0027t find evidence of a full command using this cache file since the\ncommit that introduced it and that command no longer works.\n\nI think if you ever got this to work again the command would be as long\nand complex as the ones already shown in the document.\n\nI would also argue that some of the other caches, for example Fuschia\u0027s,\nare much better example of multi-target runtimes builds. If what\u0027s in\nthis document isn\u0027t enough, folks should be learning from those files\nand about the runtimes build overall before attempting anything complex\n(though it does not take much to be \"complex\").",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "31ead45d052fe3fac8269ec55353034b0e58e3c4",
      "old_mode": 33188,
      "old_path": "llvm/docs/HowToCrossCompileBuiltinsOnArm.rst",
      "new_id": "d7759ad8edd0649e84da3a7a3c65aed6f5c36c6d",
      "new_mode": 33188,
      "new_path": "llvm/docs/HowToCrossCompileBuiltinsOnArm.rst"
    }
  ]
}
