Undefined Symbols While Compiling to x86_64-unknown-uefi

I'm trying to compile this crate to the x86_64-unknown-uefi target and getting errors at link time. rust-lld seems not to be able to find symbols __sync_val_compare_and_swap_16 and __sync_lock_test_and_set_16. Does anyone know where these symbols exist so that I can resolve the errors? They seem to be compiler intrinsics, so perhaps they should they come from rustc or the compiler_builtins crate automatically. Not sure if that understanding is correct.

Build commandline used: cargo xbuild --target x86_64-unknown-uefi
Nightly version: rustc 1.40.0-nightly (9e346646e 2019-11-08)
Host OS: Windows 10
Build output:

error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "-flavor" "link" "/NOLOGO" "/NXCOMPAT" "/nodefaultlib" "/entry:efi_main" "/subsystem:efi_application" "/LIBPATH:C:\\Projects\\personal\\uefi-practice\\target/sysroot\\lib\\rustlib\\x86_64-unknown-uefi\\lib" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.123mw28k7zdzq2hs.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.168luiprrv56txez.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.16ttvqfum6y188eu.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.1dalg2fy51wb8lah.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.1odqm0xkwcmyhq3o.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.24j9n0hj0zaekqvr.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.31oq7a7pt1mgmvjv.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.38ggyki2ov1emb8e.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.3mrbkqg5o6j3v878.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.3y9802a992jwu9sz.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.437tepsiq7p53qdq.rcgu.o" "C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.l05bl28cf0s74oy.rcgu.o" "/OUT:C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps\\uefi_practice-f7df25972b29a10d.efi" "/OPT:REF,NOICF" "/DEBUG" "/LIBPATH:C:\\Projects\\personal\\uefi-practice\\target\\x86_64-unknown-uefi\\debug\\deps" "/LIBPATH:C:\\Projects\\personal\\uefi-practice\\target\\debug\\deps" "/LIBPATH:C:\\Projects\\personal\\uefi-practice\\target/sysroot\\lib\\rustlib\\x86_64-unknown-uefi\\lib" "C:\\Projects\\personal\\uefi-practice\\target\\sysroot\\lib\\rustlib\\x86_64-unknown-uefi\\lib\\librustc_std_workspace_core-4db334855bda32b0.rlib" "C:\\Projects\\personal\\uefi-practice\\target\\sysroot\\lib\\rustlib\\x86_64-unknown-uefi\\lib\\libcore-8f5696ff045f66ab.rlib" "C:\\Projects\\personal\\uefi-practice\\target\\sysroot\\lib\\rustlib\\x86_64-unknown-uefi\\lib\\libcompiler_builtins-1bdfce1174c15c42.rlib"
  = note: rust-lld: error: undefined symbol: __sync_val_compare_and_swap_16
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memcpy_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memmove_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memmove_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memmove_element_unordered_atomic_16)

          rust-lld: error: undefined symbol: __sync_lock_test_and_set_16
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memcpy_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memmove_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memmove_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memmove_element_unordered_atomic_16)
          >>> referenced by libcompiler_builtins-1bdfce1174c15c42.rlib(compiler_builtins-1bdfce1174c15c42.compiler_builtins.en09gzh0-cgu.3.rcgu.o):(__llvm_memset_element_unordered_atomic_16)

Was due to a bug in compiler_builtins and is now fixed: https://github.com/rust-lang/rust/issues/66320