Skip to content

Commit ad3f40a

Browse files
committed
Remove build infrastructure for globally enabling noncopyable types
Now that the compilation model of noncopyable types is enabled everywhere, and one can enable the feature for specific modules, we no longer need a separate build-script/CMake option to enable it globally. Remove it all. (cherry picked from commit 922e3da)
1 parent e78e36f commit ad3f40a

File tree

13 files changed

+1
-60
lines changed

13 files changed

+1
-60
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,6 @@ option(SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED
663663
"Enable experimental distributed actors and functions"
664664
FALSE)
665665

666-
option(SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS
667-
"Enable experimental NoncopyableGenerics"
668-
FALSE)
669-
670666
option(SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES
671667
"Enable experimental NonescapableTypes"
672668
FALSE)
@@ -1278,7 +1274,6 @@ if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
12781274
message(STATUS "Differentiable Programming Support: ${SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING}")
12791275
message(STATUS "Concurrency Support: ${SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY}")
12801276
message(STATUS "Distributed Support: ${SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED}")
1281-
message(STATUS "NoncopyableGenerics Support: ${SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS}")
12821277
message(STATUS "NonEscapableTypes Support: ${SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES}")
12831278
message(STATUS "String Processing Support: ${SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING}")
12841279
message(STATUS "Backtracing Support: ${SWIFT_ENABLE_BACKTRACING}")

include/swift/Config.h.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
#cmakedefine01 SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED
1616

17-
#cmakedefine01 SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS
18-
1917
#cmakedefine01 SWIFT_ENABLE_GLOBAL_ISEL_ARM64
2018

2119
#endif // SWIFT_CONFIG_H

lib/Basic/LangOptions.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ LangOptions::LangOptions() {
4848

4949
// Note: Introduce default-on language options here.
5050

51-
// Default-on NoncopyableGenerics when the build-script setting is enabled.
52-
if (SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS) {
53-
Features.insert(Feature::NoncopyableGenerics);
54-
}
55-
5651
// Enable any playground options that are enabled by default.
5752
#define PLAYGROUND_OPTION(OptionName, Description, DefaultOn, HighPerfOn) \
5853
if (DefaultOn) \

stdlib/cmake/modules/StdlibOptions.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@ option(SWIFT_STDLIB_EXPERIMENTAL_HERMETIC_SEAL_AT_LINK
175175
"Should stdlib be built with -experimental-hermetic-seal-at-link"
176176
FALSE)
177177

178-
option(SWIFT_STDLIB_EXPERIMENTAL_NONCOPYABLE_GENERICS
179-
"Should stdlib be built with NoncopyableGenerics enabled?"
180-
TRUE)
181-
182178
option(SWIFT_STDLIB_PASSTHROUGH_METADATA_ALLOCATOR
183179
"Build stdlib without a custom implementation of MetadataAllocator, relying on malloc+free instead."
184180
FALSE)

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,7 @@ function(_compile_swift_files
612612
list(APPEND swift_flags "-experimental-hermetic-seal-at-link")
613613
endif()
614614

615-
if(SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS OR SWIFT_STDLIB_EXPERIMENTAL_NONCOPYABLE_GENERICS)
616-
list(APPEND swift_flags "-enable-experimental-feature" "NoncopyableGenerics")
617-
endif()
615+
list(APPEND swift_flags "-enable-experimental-feature" "NoncopyableGenerics")
618616

619617
if(SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES)
620618
list(APPEND swift_flags "-enable-experimental-feature" "NonescapableTypes")

test/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ normalize_boolean_spelling(SWIFT_ENABLE_SOURCEKIT_TESTS)
192192
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING)
193193
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY)
194194
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED)
195-
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS)
196195
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES)
197196
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
198197
normalize_boolean_spelling(SWIFT_ENABLE_EXPERIMENTAL_OBSERVATION)
@@ -402,10 +401,6 @@ foreach(SDK ${SWIFT_SDKS})
402401
list(APPEND LIT_ARGS "--param" "distributed")
403402
endif()
404403

405-
if(SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS)
406-
list(APPEND LIT_ARGS "--param" "noncopyable_generics")
407-
endif()
408-
409404
if(SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES)
410405
list(APPEND LIT_ARGS "--param" "nonescapable_types")
411406
endif()

test/lit.site.cfg.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ if "@SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY@" == "TRUE":
143143
config.available_features.add('concurrency')
144144
if "@SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED@" == "TRUE":
145145
config.available_features.add('distributed')
146-
if "@SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS@" == "TRUE":
147-
config.available_features.add('noncopyable_generics')
148146
if "@SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES@" == "TRUE":
149147
config.available_features.add('nonescapable_types')
150148
if "@SWIFT_STDLIB_STATIC_PRINT@" == "TRUE":

utils/build-presets.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,8 +637,6 @@ lto
637637
mixin-preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx
638638
build-subdir=buildbot_incremental
639639

640-
enable-experimental-noncopyable-generics=1
641-
642640
[preset: buildbot_incremental,tools=RA,llvm-only]
643641
build-subdir=buildbot_incremental_llvmonly
644642

utils/build_swift/build_swift/driver_arguments.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,10 +1347,6 @@ def create_argument_parser():
13471347
default=True,
13481348
help='Enable experimental Swift distributed actors.')
13491349

1350-
option('--enable-experimental-noncopyable-generics', toggle_true,
1351-
default=False,
1352-
help='Enable experimental NoncopyableGenerics.')
1353-
13541350
option('--enable-experimental-nonescapable-types', toggle_true,
13551351
default=False,
13561352
help='Enable experimental NonescapableTypes.')

utils/build_swift/tests/expected_options.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@
168168
'enable_experimental_cxx_interop': True,
169169
'enable_cxx_interop_swift_bridging_header': True,
170170
'enable_experimental_distributed': True,
171-
'enable_experimental_noncopyable_generics': False,
172171
'enable_experimental_nonescapable_types': False,
173172
'enable_experimental_string_processing': True,
174173
'enable_experimental_observation': True,
@@ -593,7 +592,6 @@ class BuildScriptImplOption(_BaseOption):
593592
EnableOption('--enable-experimental-cxx-interop'),
594593
EnableOption('--enable-cxx-interop-swift-bridging-header'),
595594
EnableOption('--enable-experimental-distributed'),
596-
EnableOption('--enable-experimental-noncopyable-generics'),
597595
EnableOption('--enable-experimental-nonescapable-types'),
598596
EnableOption('--enable-experimental-string-processing'),
599597
EnableOption('--enable-experimental-observation'),

0 commit comments

Comments
 (0)