Enable building of ARM32 (#4349)

Summary:
The original logic was assuming that the only architectures that the code would build for on Windows were x86 and x64. This change will enable building for arm32 on Windows as well.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4349

Differential Revision: D10280887

Pulled By: sagar0

fbshipit-source-id: 9ca0bede25505d22e13acf916d38aeeaaf5d981a
main
Jiri Appl 6 years ago committed by Facebook Github Bot
parent 3a4bd36fed
commit b0026e1f5f
  1. 6
      util/thread_local.cc

@ -204,7 +204,7 @@ extern "C" {
// The linker must not discard thread_callback_on_exit. (We force a reference
// to this variable with a linker /include:symbol pragma to ensure that.) If
// this variable is discarded, the OnThreadExit function will never be called.
#ifdef _WIN64
#ifndef _X86_
// .CRT section is merged with .rdata on x64 so it must be constant data.
#pragma const_seg(".CRT$XLB")
@ -219,7 +219,7 @@ const PIMAGE_TLS_CALLBACK p_thread_callback_on_exit =
#pragma comment(linker, "/include:_tls_used")
#pragma comment(linker, "/include:p_thread_callback_on_exit")
#else // _WIN64
#else // _X86_
#pragma data_seg(".CRT$XLB")
PIMAGE_TLS_CALLBACK p_thread_callback_on_exit = wintlscleanup::WinOnThreadExit;
@ -229,7 +229,7 @@ PIMAGE_TLS_CALLBACK p_thread_callback_on_exit = wintlscleanup::WinOnThreadExit;
#pragma comment(linker, "/INCLUDE:__tls_used")
#pragma comment(linker, "/INCLUDE:_p_thread_callback_on_exit")
#endif // _WIN64
#endif // _X86_
#else
// https://github.com/couchbase/gperftools/blob/master/src/windows/port.cc

Loading…
Cancel
Save