Skip to content

Commit

Permalink
Use modified tbb include path (Linux stdlib forces this).
Browse files Browse the repository at this point in the history
* Linux has decided to break their entire stdlib by adding a bunch of tbb garbage
  to their stdlib headers, which means if a proper valid TBB library happens to
  exist on a users Linux system, the stdlib will completely break itself, thus we do
  everything in our power to ensure the Linux stdlib doesn't see our fully proper
  valid TBB library.
  • Loading branch information
furby-tm committed Aug 5, 2024
1 parent 361adbf commit 144f9ea
Show file tree
Hide file tree
Showing 76 changed files with 172 additions and 124 deletions.
49 changes: 47 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "b6dbd07823040b8eb65c53f596893481e2f6b31e3806c0304ecbf9d7ff4de7b1",
"originHash" : "09a37217d26d064bbfb26491267019087c42146ab45bd3625ad90873ba20141d",
"pins" : [
{
"identity" : "aexml",
Expand All @@ -10,6 +10,15 @@
"version" : "4.6.1"
}
},
{
"identity" : "galah",
"kind" : "remoteSourceControl",
"location" : "https://github.com/wabiverse/galah.git",
"state" : {
"revision" : "a90d086184e8e0fb3d32803b051acf75ff50d66d",
"version" : "1.0.0"
}
},
{
"identity" : "graphviz",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -37,6 +46,24 @@
"version" : "1.7.6"
}
},
{
"identity" : "metaversepythonframework",
"kind" : "remoteSourceControl",
"location" : "https://github.com/wabiverse/MetaversePythonFramework",
"state" : {
"revision" : "e2f4ba867b7e287a283a27a0005ab64deef14279",
"version" : "3.11.7"
}
},
{
"identity" : "metaversevulkanframework",
"kind" : "remoteSourceControl",
"location" : "https://github.com/wabiverse/MetaverseVulkanFramework",
"state" : {
"revision" : "13c7061599c61a4959c558d8ec1836e5b32b640b",
"version" : "1.26.2"
}
},
{
"identity" : "pathkit",
"kind" : "remoteSourceControl",
Expand All @@ -46,6 +73,15 @@
"version" : "1.0.1"
}
},
{
"identity" : "pythonkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pvieito/PythonKit.git",
"state" : {
"revision" : "43647b36cacb99558e57ef98e97ef598f91d1164",
"version" : "0.5.0"
}
},
{
"identity" : "rainbow",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -145,6 +181,15 @@
"version" : "1.6.1"
}
},
{
"identity" : "swift-macro-toolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stackotter/swift-macro-toolkit",
"state" : {
"revision" : "106daeb38eb3f52b1540aed981fc63fa22274576",
"version" : "0.3.1"
}
},
{
"identity" : "swift-markdown",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -246,4 +291,4 @@
}
],
"version" : 3
}
}
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,8 @@ enum Arch
case web
/// everything not windows (apple + linux).
case nix
/// everything not linux (apple + windows).
case applewindows
/// everything not apple (linux + windows).
case linwin

Expand All @@ -1522,6 +1524,7 @@ enum Arch
case .windows: [.windows]
case .web: [.wasi]
case .nix: [.macOS, .iOS, .visionOS, .tvOS, .watchOS, .linux, .android, .openbsd]
case .applewindows: [.macOS, .iOS, .visionOS, .tvOS, .watchOS, .windows]
case .linwin: [.linux, .android, .openbsd, .windows]
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Ar/include/Ar/threadLocalScopedCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "Vt/value.h"

#include <memory>
#include <tbb/enumerable_thread_specific.h>
#include <OneTBB/tbb/enumerable_thread_specific.h>
#include <vector>

PXR_NAMESPACE_OPEN_SCOPE
Expand Down
2 changes: 1 addition & 1 deletion Sources/Ar/resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "Tf/type.h"
#include "Vt/value.h"

#include <tbb/concurrent_hash_map.h>
#include <OneTBB/tbb/concurrent_hash_map.h>

#include <memory>
#include <mutex>
Expand Down
18 changes: 9 additions & 9 deletions Sources/Extras/usd/examples/usdObj/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@
#include <boost/utility.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/variant.hpp>
#include <tbb/cache_aligned_allocator.h>
#include <tbb/concurrent_queue.h>
#include <tbb/concurrent_unordered_set.h>
#include <tbb/concurrent_vector.h>
#include <tbb/enumerable_thread_specific.h>
#include <tbb/spin_mutex.h>
#include <tbb/spin_rw_mutex.h>
#include <tbb/task.h>
#include <tbb/task_arena.h>
#include <OneTBB/tbb/cache_aligned_allocator.h>
#include <OneTBB/tbb/concurrent_queue.h>
#include <OneTBB/tbb/concurrent_unordered_set.h>
#include <OneTBB/tbb/concurrent_vector.h>
#include <OneTBB/tbb/enumerable_thread_specific.h>
#include <OneTBB/tbb/spin_mutex.h>
#include <OneTBB/tbb/spin_rw_mutex.h>
#include <OneTBB/tbb/task.h>
#include <OneTBB/tbb/task_arena.h>
#ifdef PXR_PYTHON_SUPPORT_ENABLED
#include "Tf/pySafePython.h"
#endif // PXR_PYTHON_SUPPORT_ENABLED
18 changes: 9 additions & 9 deletions Sources/Extras/usd/examples/usdSchemaExamples/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@
#include <boost/unordered_map.hpp>
#include <boost/utility.hpp>
#include <boost/utility/enable_if.hpp>
#include <tbb/cache_aligned_allocator.h>
#include <tbb/concurrent_queue.h>
#include <tbb/concurrent_unordered_set.h>
#include <tbb/concurrent_vector.h>
#include <tbb/enumerable_thread_specific.h>
#include <tbb/spin_mutex.h>
#include <tbb/spin_rw_mutex.h>
#include <tbb/task.h>
#include <tbb/task_arena.h>
#include <OneTBB/tbb/cache_aligned_allocator.h>
#include <OneTBB/tbb/concurrent_queue.h>
#include <OneTBB/tbb/concurrent_unordered_set.h>
#include <OneTBB/tbb/concurrent_vector.h>
#include <OneTBB/tbb/enumerable_thread_specific.h>
#include <OneTBB/tbb/spin_mutex.h>
#include <OneTBB/tbb/spin_rw_mutex.h>
#include <OneTBB/tbb/task.h>
#include <OneTBB/tbb/task_arena.h>
#ifdef PXR_PYTHON_SUPPORT_ENABLED
#include "Tf/pySafePython.h"
#endif // PXR_PYTHON_SUPPORT_ENABLED
2 changes: 1 addition & 1 deletion Sources/Hd/flattenedPrimvarsDataSourceProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "Hd/primvarSchema.h"
#include "Hd/primvarsSchema.h"

#include <tbb/concurrent_hash_map.h>
#include <OneTBB/tbb/concurrent_hash_map.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/include/Hd/changeTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "Sdf/path.h"
#include "Tf/hashmap.h"

#include <tbb/concurrent_hash_map.h>
#include <OneTBB/tbb/concurrent_hash_map.h>
#include <atomic>

PXR_NAMESPACE_OPEN_SCOPE
Expand Down
4 changes: 2 additions & 2 deletions Sources/Hd/include/Hd/dependencyForwardingSceneIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "Hd/api.h"
#include "Hd/filteringSceneIndex.h"

#include <tbb/concurrent_unordered_map.h>
#include <tbb/concurrent_unordered_set.h>
#include <OneTBB/tbb/concurrent_unordered_map.h>
#include <OneTBB/tbb/concurrent_unordered_set.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/include/Hd/flatteningSceneIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "Hd/filteringSceneIndex.h"

#include "Sdf/pathTable.h"
#include <tbb/concurrent_hash_map.h>
#include <OneTBB/tbb/concurrent_hash_map.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/include/Hd/instanceRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "Hd/perfLog.h"
#include "Hf/perfLog.h"

#include <tbb/concurrent_unordered_map.h>
#include <OneTBB/tbb/concurrent_unordered_map.h>

#include <memory>
#include <mutex>
Expand Down
4 changes: 2 additions & 2 deletions Sources/Hd/include/Hd/primGather.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include "Sdf/path.h"

#include <vector>
#include <tbb/enumerable_thread_specific.h>
#include <tbb/blocked_range.h>
#include <OneTBB/tbb/enumerable_thread_specific.h>
#include <OneTBB/tbb/blocked_range.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/include/Hd/renderIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "Gf/vec4i.h"
#include "Tf/hashmap.h"

#include <tbb/enumerable_thread_specific.h>
#include <OneTBB/tbb/enumerable_thread_specific.h>

#include <vector>
#include <unordered_map>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/mergingSceneIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "Tf/denseHashSet.h"
#include "Trace/traceImpl.h"
#include "Work/dispatcher.h"
#include <tbb/concurrent_queue.h>
#include <OneTBB/tbb/concurrent_queue.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/primGather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "Tf/diagnostic.h"
#include "Work/dispatcher.h"
#include "Work/withScopedParallelism.h"
#include <tbb/parallel_for.h>
#include <OneTBB/tbb/parallel_for.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
4 changes: 2 additions & 2 deletions Sources/Hd/renderIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
#include <mutex>
#include <unordered_set>

#include <tbb/concurrent_unordered_map.h>
#include <tbb/concurrent_vector.h>
#include <OneTBB/tbb/concurrent_unordered_map.h>
#include <OneTBB/tbb/concurrent_vector.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
2 changes: 1 addition & 1 deletion Sources/Hd/sceneIndexAdapterSceneDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
#include "Hd/volumeFieldSchema.h"
#include "Hd/xformSchema.h"

#include <tbb/concurrent_unordered_set.h>
#include <OneTBB/tbb/concurrent_unordered_set.h>

#include "Hf/perfLog.h"

Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenUSD/Commands/UpdateCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ public enum Pxr: String, CaseIterable
source = source.replacingOccurrences(of: "<tbb/mutex.h>", with: "<mutex>")
source = source.replacingOccurrences(of: "tbb::mutex", with: "std::mutex")
// modern versions of tbb no longer contain a task_scheduler_init.
source = source.replacingOccurrences(of: "#include <tbb/task_scheduler_init.h>", with: "#if WITH_TBB_LEGACY\n#include <tbb/task_scheduler_init.h>\n#endif /* WITH_TBB_LEGACY */")
source = source.replacingOccurrences(of: "#include <OneTBB/tbb/task_scheduler_init.h>", with: "#if WITH_TBB_LEGACY\n#include <OneTBB/tbb/task_scheduler_init.h>\n#endif /* WITH_TBB_LEGACY */")

/* ---- materialx headers ----------- */

Expand Down
6 changes: 3 additions & 3 deletions Sources/OpenUSD/Resources/Work/dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#include "Tf/errorMark.h"
#include "Tf/errorTransport.h"

#include <tbb/concurrent_vector.h>
#include <tbb/task.h>
#include <tbb/task_group.h>
#include <OneTBB/tbb/concurrent_vector.h>
#include <OneTBB/tbb/task.h>
#include <OneTBB/tbb/task_group.h>

#include <functional>
#include <type_traits>
Expand Down
4 changes: 2 additions & 2 deletions Sources/OpenUSD/Resources/Work/threadLimits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#include "Tf/envSetting.h"

#if WITH_TBB_LEGACY
#include <tbb/task_scheduler_init.h>
#include <OneTBB/tbb/task_scheduler_init.h>
#endif /* WITH_TBB_LEGACY */
#include <tbb/task_arena.h>
#include <OneTBB/tbb/task_arena.h>

#include <algorithm>
#include <atomic>
Expand Down
4 changes: 2 additions & 2 deletions Sources/Pcp/cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
#include "Work/utils.h"
#include "Work/withScopedParallelism.h"

#include <tbb/concurrent_queue.h>
#include <tbb/spin_rw_mutex.h>
#include <OneTBB/tbb/concurrent_queue.h>
#include <OneTBB/tbb/spin_rw_mutex.h>

#include <algorithm>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/diagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "Tf/enum.h"
#include "Tf/stringUtils.h"

#include <tbb/concurrent_hash_map.h>
#include <OneTBB/tbb/concurrent_hash_map.h>
#include <fstream>
#include <mutex>
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/include/Pcp/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "Sdf/path.h"
#include <pxr/pxrns.h>

#include <tbb/spin_mutex.h>
#include <OneTBB/tbb/spin_mutex.h>

#include <unordered_map>

Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/include/Pcp/layerStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "Pcp/layerStackIdentifier.h"
#include "Pcp/mapExpression.h"

#include <tbb/spin_mutex.h>
#include <OneTBB/tbb/spin_mutex.h>
#include <iosfwd>
#include <memory>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/include/Pcp/mapExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <boost/intrusive_ptr.hpp>

#include <tbb/spin_mutex.h>
#include <OneTBB/tbb/spin_mutex.h>

#include <atomic>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/include/Pcp/primIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "Pcp/node.h"
#include "Pcp/types.h"

#include <tbb/spin_rw_mutex.h>
#include <OneTBB/tbb/spin_rw_mutex.h>

#include <functional>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/layerStackRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "Tf/diagnostic.h"
#include "Tf/staticData.h"

#include <tbb/queuing_rw_mutex.h>
#include <OneTBB/tbb/queuing_rw_mutex.h>

#include <boost/unordered_map.hpp>

Expand Down
2 changes: 1 addition & 1 deletion Sources/Pcp/mapExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "Trace/traceImpl.h"

#include <tbb/concurrent_hash_map.h>
#include <OneTBB/tbb/concurrent_hash_map.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
4 changes: 2 additions & 2 deletions Sources/Plug/registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include "Tf/type.h"
#include "Work/withScopedParallelism.h"

#include <tbb/concurrent_vector.h>
#include <tbb/spin_mutex.h>
#include <OneTBB/tbb/concurrent_vector.h>
#include <OneTBB/tbb/spin_mutex.h>

#include <functional>

Expand Down
Loading

0 comments on commit 144f9ea

Please sign in to comment.