 CROSS PLATFORM PITFALLS AND HOW TO AVOID THEMCROSS-PLATFORM PITFALLS AND HOW TO AVOID THEM Erika Sweet (she/her) Microsoft C++ TeamWelcome to CppCon 2020! Visit our table at the Expo Hall https://aka.ms/cppcon/expo • Meet the Microsoft C++ include/myTarget PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) …and not platform specificUse one toolchain file per target platform…. set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) …instead of adding logic to your toolchain fileCMake: other resources Daniel Pfeifer: Effective CMake Henry Schreiner & other contributors:0 码力 | 67 页 | 360.44 KB | 6 月前3 CROSS PLATFORM PITFALLS AND HOW TO AVOID THEMCROSS-PLATFORM PITFALLS AND HOW TO AVOID THEM Erika Sweet (she/her) Microsoft C++ TeamWelcome to CppCon 2020! Visit our table at the Expo Hall https://aka.ms/cppcon/expo • Meet the Microsoft C++ include/myTarget PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) …and not platform specificUse one toolchain file per target platform…. set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) …instead of adding logic to your toolchain fileCMake: other resources Daniel Pfeifer: Effective CMake Henry Schreiner & other contributors:0 码力 | 67 页 | 360.44 KB | 6 月前3
 Cross-Platform Floating-Point Determinism Out of the Box1 (Sort of) 2 3Why FP Determinism is Important?_ CppCon 2024 sixit:: 5 ✅ Same Executable Cross Platform Different Contexts ❌ ❌ 1 (Sort of) 2 3 General Sanity, Testability Distributed when using the identically compiled files and run on systems that adhere to the IEEE standards. Cross platform synchronized network simulations or replays will not possible [sic].” - Most upvoted answer0 码力 | 31 页 | 3.88 MB | 6 月前3 Cross-Platform Floating-Point Determinism Out of the Box1 (Sort of) 2 3Why FP Determinism is Important?_ CppCon 2024 sixit:: 5 ✅ Same Executable Cross Platform Different Contexts ❌ ❌ 1 (Sort of) 2 3 General Sanity, Testability Distributed when using the identically compiled files and run on systems that adhere to the IEEE standards. Cross platform synchronized network simulations or replays will not possible [sic].” - Most upvoted answer0 码力 | 31 页 | 3.88 MB | 6 月前3
 High-Performance Cross-Platform Architecture: C++20 Innovations35-year career in video games and embedded software • Started using C++ in 1995 • First cross-platform project in 1994Cross-Platform Architecture Goals • Take advantage of all platforms • Focus on the compiler implementationThe SIMD Feature in the Build System • Place appropriate feature macro definition in toolchain files: set(PLT_SIMD Common) • In the common project, add the features to the preprocessor definitions: registers, including 4x floats, excluding 2x doublesUpdating the Build System for SSE • Create a new toolchain file • Set the SIMD feature macro: set(PLT_SIMD SSE) • No change is required to the other tool0 码力 | 75 页 | 581.83 KB | 6 月前3 High-Performance Cross-Platform Architecture: C++20 Innovations35-year career in video games and embedded software • Started using C++ in 1995 • First cross-platform project in 1994Cross-Platform Architecture Goals • Take advantage of all platforms • Focus on the compiler implementationThe SIMD Feature in the Build System • Place appropriate feature macro definition in toolchain files: set(PLT_SIMD Common) • In the common project, add the features to the preprocessor definitions: registers, including 4x floats, excluding 2x doublesUpdating the Build System for SSE • Create a new toolchain file • Set the SIMD feature macro: set(PLT_SIMD SSE) • No change is required to the other tool0 码力 | 75 页 | 581.83 KB | 6 月前3
 Conan 2.10 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 803 页 | 5.02 MB | 10 月前3 Conan 2.10 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 803 页 | 5.02 MB | 10 月前3
 Conan 2.9 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 795 页 | 4.99 MB | 10 月前3 Conan 2.9 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 795 页 | 4.99 MB | 10 月前3
 Conan 2.8 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 785 页 | 4.95 MB | 10 月前3 Conan 2.8 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 785 页 | 4.95 MB | 10 月前3
 Conan 2.6 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 777 页 | 4.91 MB | 10 月前3 Conan 2.6 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 777 页 | 4.91 MB | 10 月前3
 Conan 2.7 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 779 页 | 4.93 MB | 10 月前3 Conan 2.7 Documentationtools examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 7.4 Cross-building examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . target any existing platform: ranging from bare metal to desktop, mobile, embedded, servers, and cross-building. Conan works with any build system too. There are built-in integrations to support the most pip. This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine0 码力 | 779 页 | 4.93 MB | 10 月前3
 What's New in Visual Studio for C++ Developers3. MSVC Toolchain 4. Debugging, Cross-Platform & Source Control https://aka.ms/Visual-StudioVisual Studio Agenda 1. Productivity 2. Game Development 3. MSVC Toolchain 4. Debugging, Cross-Platform ( Tab to accept )Visual Studio Agenda 1. Productivity 2. Game Development 3. MSVC Toolchain 4. Debugging, Cross-Platform & Source ControlUnreal Engine IntegrationsDirect Support for Unreal Engine Projects Convention CenterVisual Studio Agenda 1. Productivity 2. Game Development 3. MSVC Toolchain 4. Debugging, Cross-Platform & Source ControlFeature complete • std::optional monadic interface • std::mdspan0 码力 | 46 页 | 4.07 MB | 6 月前3 What's New in Visual Studio for C++ Developers3. MSVC Toolchain 4. Debugging, Cross-Platform & Source Control https://aka.ms/Visual-StudioVisual Studio Agenda 1. Productivity 2. Game Development 3. MSVC Toolchain 4. Debugging, Cross-Platform ( Tab to accept )Visual Studio Agenda 1. Productivity 2. Game Development 3. MSVC Toolchain 4. Debugging, Cross-Platform & Source ControlUnreal Engine IntegrationsDirect Support for Unreal Engine Projects Convention CenterVisual Studio Agenda 1. Productivity 2. Game Development 3. MSVC Toolchain 4. Debugging, Cross-Platform & Source ControlFeature complete • std::optional monadic interface • std::mdspan0 码力 | 46 页 | 4.07 MB | 6 月前3
 10 Problems Large Companies Have with Managing C++ Dependencies and How to Solve ThemLibrary features Dependency hashes Build system version Environment variables CMake toolchain files SDKsIs hash in cache? Build requested Calculate ABI hash Binary cache Download binary Establishing compliance processes for dependencies • Writing documentation for their internal customers • Cross-organizational ABI instability and version conflictsProblem 7: Duplicated engineering cost to maintain SBOM FAQ (Cybersecurity and Infrastructure Security Agency)Example spdx.json fileProblem 9: Build toolchain variations across the org •Examples: •Two teams contributing to a common application build with0 码力 | 46 页 | 917.72 KB | 6 月前3 10 Problems Large Companies Have with Managing C++ Dependencies and How to Solve ThemLibrary features Dependency hashes Build system version Environment variables CMake toolchain files SDKsIs hash in cache? Build requested Calculate ABI hash Binary cache Download binary Establishing compliance processes for dependencies • Writing documentation for their internal customers • Cross-organizational ABI instability and version conflictsProblem 7: Duplicated engineering cost to maintain SBOM FAQ (Cybersecurity and Infrastructure Security Agency)Example spdx.json fileProblem 9: Build toolchain variations across the org •Examples: •Two teams contributing to a common application build with0 码力 | 46 页 | 917.72 KB | 6 月前3
共 177 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18














 
  
 