]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Avoid popcnt on Windows when unavailable and in portable builds (#9680) v7.0.1
authorAndrew Kryczka <andrewkr@fb.com>
Thu, 10 Mar 2022 05:07:31 +0000 (21:07 -0800)
committerAndrew Kryczka <andrewkr@fb.com>
Thu, 10 Mar 2022 06:51:01 +0000 (22:51 -0800)
commitbbae679ce7bd53d267ac8310f60fa86491716666
tree84260cdfbbf3871be09d993ed5d4c8a34d13c99c
parentfe9e363ba1774f1627a933b5115b3c05840712c1
Avoid popcnt on Windows when unavailable and in portable builds (#9680)

Summary:
Fixes https://github.com/facebook/rocksdb/issues/9560. Only use popcnt intrinsic when HAVE_SSE42 is set. Also avoid setting it based on compiler test in portable builds because such test will pass on MSVC even without proper arch flags (ref: https://devblogs.microsoft.com/oldnewthing/20201026-00/?p=104397).

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9680

Test Plan: verified the combinations of -DPORTABLE and -DFORCE_SSE42 produce expected compiler flags on Linux. Verified MSVC build using PORTABLE=1 (in CircleCI) does not set HAVE_SSE42.

Reviewed By: pdillinger

Differential Revision: D34739033

Pulled By: ajkr

fbshipit-source-id: d10456f3392945fc3e59430a1777840f7b60b276
CMakeLists.txt
util/math.h