Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LLVM project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Panda
LLVM project
Commits
3211eadf
Commit
3211eadf
authored
3 years ago
by
Mehdi Amini
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Build libSupport with -Werror=global-constructors (NFC)"
This reverts commit
579cc9ad
. This breaks on Windows.
parent
579cc9ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/Support/CMakeLists.txt
+0
-20
0 additions, 20 deletions
llvm/lib/Support/CMakeLists.txt
with
0 additions
and
20 deletions
llvm/lib/Support/CMakeLists.txt
+
0
−
20
View file @
3211eadf
include
(
GetLibraryName
)
# Ensure that libSupport does not carry any static global initializer.
# libSupport can be embedded in use cases where we don't want to load all
# cl::opt unless we want to parse the command line.
# ManagedStatic can be used to enable lazy-initialization of globals.
# We don't use `add_flag_if_supported` as instead of compiling an empty file we
# check if the current platform is able to compile global std::mutex with this
# flag (Linux can, Darwin can't for example).
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Werror=global-constructors"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Werror=global-constructors"
)
CHECK_CXX_SOURCE_COMPILES
(
"
#include <mutex>
static std::mutex TestGlobalCtorDtor;
static std::recursive_mutex TestGlobalCtorDtor2;
int main() { (void)TestGlobalCtorDtor; (void)TestGlobalCtorDtor2; return 0;}
"
LLVM_HAS_NOGLOBAL_CTOR_MUTEX
)
if
(
NOT LLVM_HAS_NOGLOBAL_CTOR_MUTEX
)
string
(
REPLACE
"-Werror=global-constructors"
""
CMAKE_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
)
string
(
REPLACE
"-Werror=global-constructors"
""
CMAKE_CXX_FLAGS
${
CMAKE_C_FLAGS
}
)
endif
()
if
(
LLVM_ENABLE_ZLIB
)
set
(
imported_libs ZLIB::ZLIB
)
endif
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment