Only generate offline asm for the ARCHS (xcodebuild) or the current system (CMake)
[WebKit-https.git] / Source / JavaScriptCore / offlineasm / backends.rb
index ba1633591acf90c0466409cd8b51eb8bc4230891..faf5e50b59b436232be2e9bc54d26c481cba17f0 100644 (file)
@@ -72,6 +72,21 @@ BACKENDS.each {
     $allBackends[backend] = true
 }
 
+def canonicalizeBackendNames(backendNames)
+    newBackendNames = []
+    backendNames.each {
+        | backendName |
+        backendName = backendName.upcase
+        if backendName =~ /ARM.*/
+            backendName.sub!(/ARMV7(S?)(.*)/) { | _ | 'ARMv7' + $1.downcase + $2 }
+        end
+        backendName = "X86" if backendName == "I386"
+        newBackendNames << backendName
+        newBackendNames << "ARMv7" if backendName == "ARMv7s"
+    }
+    newBackendNames.uniq
+end
+
 def includeOnlyBackends(list)
     newValidBackends = {}
     list.each {